diff options
author | IWASE Yusuke <iwase.yusuke0@gmail.com> | 2017-10-18 11:38:29 +0900 |
---|---|---|
committer | IWASE Yusuke <iwase.yusuke0@gmail.com> | 2017-11-07 09:55:25 +0900 |
commit | a5715a7bc3c4c73a6f4d3a91980bbfe681969b94 (patch) | |
tree | ee1cefac278e8b9b19d376544bad9895a79d7f78 /server/peer.go | |
parent | 8f0c42dbfff06f11ef65c14ee23ece050aa38460 (diff) |
server: Avoid local paths left on iBGP peers
Currently, with iBGP peering, the CLI injected path will not be withdrawn
when the deletion if any other path exists on RIB, then the CLI injected
path will be left on iBGP peers even if the route is deleted on the
originator router.
This problem can cause routing loops in some case.
This patch fixes to withdraw the old best path when it was the CLI (or
gRPC) injected path.
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Diffstat (limited to 'server/peer.go')
-rw-r--r-- | server/peer.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/server/peer.go b/server/peer.go index 84b7268f..892395be 100644 --- a/server/peer.go +++ b/server/peer.go @@ -120,6 +120,10 @@ func NewPeer(g *config.Global, conf *config.Neighbor, loc *table.TableManager, p return peer } +func (peer *Peer) AS() uint32 { + return peer.fsm.pConf.State.PeerAs +} + func (peer *Peer) ID() string { return peer.fsm.pConf.State.NeighborAddress } |