summaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
authorISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>2015-03-11 23:15:35 +0000
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2015-03-20 22:30:47 +0900
commit53730a4dfd938933b87dec0c5f11a7fdbdbb2a2a (patch)
tree4cc4960c5f19429f72478a3b1a1efcec1c4f08e3 /server
parentc9ec21fe3250551b0e02fa4c7dcf776996aa2af2 (diff)
peer: don't send back routes to the source.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'server')
-rw-r--r--server/peer.go12
1 files changed, 11 insertions, 1 deletions
diff --git a/server/peer.go b/server/peer.go
index 4160ba6e..d76dd088 100644
--- a/server/peer.go
+++ b/server/peer.go
@@ -320,7 +320,17 @@ func (peer *Peer) sendUpdateMsgFromPaths(pList []table.Path) {
peer.adjRib.UpdateOut(pList)
sendpathList := []table.Path{}
for _, p := range pList {
- if _, ok := peer.rfMap[p.GetRouteFamily()]; ok {
+ _, ok := peer.rfMap[p.GetRouteFamily()]
+
+ if peer.peerConfig.NeighborAddress.Equal(p.GetNexthop()) {
+ log.WithFields(log.Fields{
+ "Topic": "Peer",
+ "Key": peer.peerConfig.NeighborAddress,
+ }).Debugf("From me. Ignore: %s", p)
+ ok = false
+ }
+
+ if ok {
sendpathList = append(sendpathList, p)
}
}