summaryrefslogtreecommitdiffhomepage
path: root/internal
diff options
context:
space:
mode:
authorAlistair King <alistair@kentik.com>2021-01-12 13:56:48 -0800
committerAlistair King <alistair@kentik.com>2021-01-12 13:56:48 -0800
commit35e733246e1aff6688f2e4f624c7a80be33fb7b9 (patch)
tree70d468633cf98e3f5593494e6055e7573fbacc08 /internal
parent635128d3e56475dfea9a06ab07feca8acf71c16a (diff)
Fix IsEBGPPeer check to use LocalAs
Previously the LocalAs setting for the neighbor was ignored when determining if the session is eBGP or not.
Diffstat (limited to 'internal')
-rw-r--r--internal/pkg/config/util.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/pkg/config/util.go b/internal/pkg/config/util.go
index d18deb50..e895d8de 100644
--- a/internal/pkg/config/util.go
+++ b/internal/pkg/config/util.go
@@ -130,7 +130,7 @@ func (n *Neighbor) IsConfederation(g *Global) bool {
}
func (n *Neighbor) IsEBGPPeer(g *Global) bool {
- return n.Config.PeerAs != g.Config.As
+ return n.Config.PeerAs != n.Config.LocalAs
}
func (n *Neighbor) CreateRfMap() map[bgp.RouteFamily]bgp.BGPAddPathMode {