diff options
Diffstat (limited to 'server/server.go')
-rw-r--r-- | server/server.go | 10 |
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) |