summaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
authorISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>2016-05-17 04:20:35 +0000
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2016-05-21 07:45:13 +0900
commit42ab0376359f1ee378958b7ae37eaf8fbc7a811b (patch)
tree7ac468e9f0daf3c5c628ad4df88b95861698dcbb /server
parentc7e1f88da3b73fbf6dc641581b6249830071a50e (diff)
policy: apply export-policy after normal path-attribute updates
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'server')
-rw-r--r--server/peer.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/server/peer.go b/server/peer.go
index e8890bc2..a1738e63 100644
--- a/server/peer.go
+++ b/server/peer.go
@@ -188,14 +188,19 @@ func (peer *Peer) processOutgoingPaths(paths, withdrawals []*table.Path) []*tabl
Neighbor: peer.fsm.peerInfo.Address,
}
for _, path := range paths {
- path = peer.policy.ApplyPolicy(peer.TableID(), table.POLICY_DIRECTION_EXPORT, filterpath(peer, path), options)
- if path == nil {
+ if filterpath(peer, path) == nil {
continue
}
if !peer.isRouteServerClient() {
path = path.Clone(path.IsWithdraw)
path.UpdatePathAttrs(peer.fsm.gConf, peer.fsm.pConf)
}
+
+ path = peer.policy.ApplyPolicy(peer.TableID(), table.POLICY_DIRECTION_EXPORT, path, options)
+ if path == nil {
+ continue
+ }
+
outgoing = append(outgoing, path)
}