diff options
author | ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> | 2015-04-27 11:03:53 +0000 |
---|---|---|
committer | ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> | 2015-04-27 15:20:53 +0000 |
commit | e735b2b1cfdc7dd3ea9f1f324ab9158fc7f19802 (patch) | |
tree | 6c8d1aa4177ef367ee061b22fe0254a44a7a81ff /server/peer.go | |
parent | 87a951546c43cb70ad3a03ec42de7cead8d25d72 (diff) |
table: add AS loop detection
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'server/peer.go')
-rw-r--r-- | server/peer.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/server/peer.go b/server/peer.go index d56e3e34..d7c3ac07 100644 --- a/server/peer.go +++ b/server/peer.go @@ -551,6 +551,15 @@ func (peer *Peer) sendUpdateMsgFromPaths(pList []table.Path) { continue } + if peer.peerConfig.PeerAs == path.GetSourceAs() { + log.WithFields(log.Fields{ + "Topic": "Peer", + "Key": peer.peerConfig.NeighborAddress, + "Data": path, + }).Debug("AS PATH loop, ignore.") + continue + } + if !path.IsWithdraw() { applied, path := peer.applyPolicies(peer.exportPolicies, path) if applied && path == nil { |