summaryrefslogtreecommitdiffhomepage
path: root/table/policy.go
diff options
context:
space:
mode:
authorSatoshi Fujimoto <satoshi.fujimoto7@gmail.com>2017-09-22 10:29:07 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2017-11-07 21:53:46 +0900
commit9e584acea92ba17a6792d4724efad0e51c118768 (patch)
tree32456e94ed1de8e57a97cf4a38d88ad43ee86680 /table/policy.go
parent9d90d038a703f9e37e6fae4c1d035e889161a9c4 (diff)
*: Support BGP Confederations (RFC 5065)
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
Diffstat (limited to 'table/policy.go')
-rw-r--r--table/policy.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/table/policy.go b/table/policy.go
index 0d112bba..fe153cf4 100644
--- a/table/policy.go
+++ b/table/policy.go
@@ -2260,7 +2260,7 @@ func (a *AsPathPrependAction) Type() ActionType {
return ACTION_AS_PATH_PREPEND
}
-func (a *AsPathPrependAction) Apply(path *Path, _ *PolicyOptions) *Path {
+func (a *AsPathPrependAction) Apply(path *Path, option *PolicyOptions) *Path {
var asn uint32
if a.useLeftMost {
aspath := path.GetAsSeqList()
@@ -2283,7 +2283,8 @@ func (a *AsPathPrependAction) Apply(path *Path, _ *PolicyOptions) *Path {
asn = a.asn
}
- path.PrependAsn(asn, a.repeat)
+ confed := option != nil && option.Info.Confederation
+ path.PrependAsn(asn, a.repeat, confed)
return path
}