diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2015-05-11 22:34:31 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2015-05-11 22:34:31 +0900 |
commit | d33d15baa6d266730b21f11547962f7ef9ddde8e (patch) | |
tree | bb17b17498ba21171cfa111bf68e95f92a155436 /server | |
parent | 584428214d0119243e5d51a7adddb7ad12da0714 (diff) |
server: don't path information to the same AS number peer
fix the above issue with route server use case.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'server')
-rw-r--r-- | server/peer.go | 4 | ||||
-rw-r--r-- | server/server.go | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/server/peer.go b/server/peer.go index ccb2538b..8687b106 100644 --- a/server/peer.go +++ b/server/peer.go @@ -167,6 +167,10 @@ func (peer *Peer) sendPathsToSiblings(pathList []table.Path) { msgData: pathList, } for _, s := range peer.siblings { + if peer.peerConfig.RouteServer.RouteServerClient && peer.peerConfig.PeerAs == s.As { + // don't send to a peer having the same AS number. + continue + } s.peerMsgCh <- pm } } diff --git a/server/server.go b/server/server.go index 5492cb1c..92b9b606 100644 --- a/server/server.go +++ b/server/server.go @@ -43,6 +43,7 @@ type serverMsg struct { type serverMsgDataPeer struct { peerMsgCh chan *peerMsg address net.IP + As uint32 } type peerMapInfo struct { @@ -176,6 +177,7 @@ func (server *BgpServer) Serve() { d := &serverMsgDataPeer{ address: peer.NeighborAddress, peerMsgCh: pch, + As: peer.PeerAs, } msg := &serverMsg{ msgType: SRV_MSG_PEER_ADDED, |