summaryrefslogtreecommitdiffhomepage
path: root/server/server.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 /server/server.go
parent9d90d038a703f9e37e6fae4c1d035e889161a9c4 (diff)
*: Support BGP Confederations (RFC 5065)
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
Diffstat (limited to 'server/server.go')
-rw-r--r--server/server.go10
1 files changed, 9 insertions, 1 deletions
diff --git a/server/server.go b/server/server.go
index 9de1c8ad..bcecdd59 100644
--- a/server/server.go
+++ b/server/server.go
@@ -720,7 +720,15 @@ func (server *BgpServer) propagateUpdate(peer *Peer, pathList []*table.Path) {
dsts = rib.ProcessPaths(append(pathList, moded...))
} else {
for idx, path := range pathList {
- if p := server.policy.ApplyPolicy(table.GLOBAL_RIB_NAME, table.POLICY_DIRECTION_IMPORT, path, nil); p != nil {
+ var options *table.PolicyOptions
+ if peer != nil {
+ options = &table.PolicyOptions{
+ Info: peer.fsm.peerInfo,
+ }
+ } else {
+ options = nil
+ }
+ if p := server.policy.ApplyPolicy(table.GLOBAL_RIB_NAME, table.POLICY_DIRECTION_IMPORT, path, options); p != nil {
path = p
} else {
path = path.Clone(true)