diff options
author | ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> | 2016-04-12 10:16:34 +0000 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2016-04-19 09:56:41 +0900 |
commit | 332766189685028c4f9852e4285fb1a9025223cc (patch) | |
tree | f04106d60bf45f578e7168d42d3dcf3d04be5fd5 /server/peer.go | |
parent | 291d56f8df8213b77ff30b37abf2bee03ad45304 (diff) |
server: send local withdrawal paths regardless of path calculation result
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'server/peer.go')
-rw-r--r-- | server/peer.go | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/server/peer.go b/server/peer.go index 6f4f6992..0f6b37ec 100644 --- a/server/peer.go +++ b/server/peer.go @@ -166,7 +166,7 @@ func (peer *Peer) getBestFromLocal(rfList []bgp.RouteFamily) ([]*table.Path, []* return pathList, filtered } -func (peer *Peer) processOutgoingPaths(paths []*table.Path) []*table.Path { +func (peer *Peer) processOutgoingPaths(paths, withdrawals []*table.Path) []*table.Path { if peer.fsm.state != bgp.BGP_FSM_ESTABLISHED { return nil } @@ -179,6 +179,12 @@ func (peer *Peer) processOutgoingPaths(paths []*table.Path) []*table.Path { } outgoing := make([]*table.Path, 0, len(paths)) + for _, path := range withdrawals { + if path.IsLocal() { + outgoing = append(outgoing, path) + } + } + options := &table.PolicyOptions{ Neighbor: peer.fsm.peerInfo.Address, } |