diff options
Diffstat (limited to 'server/server.go')
-rw-r--r-- | server/server.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/server/server.go b/server/server.go index 38c4ea63..7557cf70 100644 --- a/server/server.go +++ b/server/server.go @@ -668,6 +668,7 @@ func (server *BgpServer) propagateUpdate(peer *Peer, pathList []*table.Path) []* } } else { rib := server.globalRib + pathList = rib.ApplyPolicy(table.POLICY_DIRECTION_IMPORT, pathList) sendPathList, _ := rib.ProcessPaths(pathList) if len(sendPathList) == 0 { return msgs @@ -679,7 +680,7 @@ func (server *BgpServer) propagateUpdate(peer *Peer, pathList []*table.Path) []* if targetPeer.isRouteServerClient() || targetPeer.fsm.state != bgp.BGP_FSM_ESTABLISHED { continue } - f := filterpath(targetPeer, sendPathList) + f := rib.ApplyPolicy(table.POLICY_DIRECTION_EXPORT, filterpath(targetPeer, sendPathList)) if len(f) == 0 { continue } @@ -864,6 +865,7 @@ func (server *BgpServer) SetPolicy(pl config.RoutingPolicy) { } server.policyMap = pMap server.routingPolicy = pl + server.globalRib.SetPolicy(server.bgpConfig.Global.ApplyPolicy, server.policyMap) } func (server *BgpServer) handlePolicy(pl config.RoutingPolicy) { |