From d33d15baa6d266730b21f11547962f7ef9ddde8e Mon Sep 17 00:00:00 2001 From: FUJITA Tomonori Date: Mon, 11 May 2015 22:34:31 +0900 Subject: 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 --- server/peer.go | 4 ++++ server/server.go | 2 ++ 2 files changed, 6 insertions(+) (limited to 'server') 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, -- cgit v1.2.3