summaryrefslogtreecommitdiffhomepage
path: root/server/server.go
diff options
context:
space:
mode:
Diffstat (limited to 'server/server.go')
-rw-r--r--server/server.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/server/server.go b/server/server.go
index a3d512a9..52c0d3ac 100644
--- a/server/server.go
+++ b/server/server.go
@@ -314,6 +314,18 @@ func filterpath(peer *Peer, pathList []*table.Path) []*table.Path {
continue
}
+ selfGenerated := path.GetSource().ID == nil
+ fromAS := path.GetSource().AS
+ myAS := peer.globalConfig.As
+ if !selfGenerated && !peer.isEBGP && myAS == fromAS {
+ log.WithFields(log.Fields{
+ "Topic": "Peer",
+ "Key": peer.config.NeighborAddress,
+ "Data": path,
+ }).Debug("From same AS, ignore.")
+ continue
+ }
+
if peer.config.NeighborAddress.Equal(path.GetSource().Address) {
log.WithFields(log.Fields{
"Topic": "Peer",