From 35e733246e1aff6688f2e4f624c7a80be33fb7b9 Mon Sep 17 00:00:00 2001 From: Alistair King Date: Tue, 12 Jan 2021 13:56:48 -0800 Subject: Fix IsEBGPPeer check to use LocalAs Previously the LocalAs setting for the neighbor was ignored when determining if the session is eBGP or not. --- internal/pkg/config/util.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 { -- cgit v1.2.3