diff options
author | ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> | 2015-10-13 07:40:24 +0900 |
---|---|---|
committer | ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> | 2015-10-13 07:40:24 +0900 |
commit | 05d86aada38369b97f7331c8863bd21aa0057061 (patch) | |
tree | 2b3f3bf5b979adcf97deeb5b99b5b26252012785 /server/server.go | |
parent | 31943b5229337b9648fd9ade8e4ec538f30c1a56 (diff) |
policy: fix bug of not applying global export policy in getBestFromLocal
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'server/server.go')
-rw-r--r-- | server/server.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/server/server.go b/server/server.go index c7e22475..7a5d1c86 100644 --- a/server/server.go +++ b/server/server.go @@ -1244,7 +1244,7 @@ func (server *BgpServer) getBestFromLocal(peer *Peer) ([]*table.Path, []*table.P rib := server.globalRib l, _ := peer.fsm.LocalHostPort() peer.conf.Transport.TransportConfig.LocalAddress = net.ParseIP(l) - bests := filterpath(peer, peer.getBests(rib)) + bests := rib.ApplyPolicy(table.POLICY_DIRECTION_EXPORT, filterpath(peer, peer.getBests(rib))) pathList = make([]*table.Path, 0, len(bests)) for _, path := range bests { path.UpdatePathAttrs(&server.bgpConfig.Global, &peer.conf) |