diff options
author | Alistair King <alistair@kentik.com> | 2021-01-12 13:56:48 -0800 |
---|---|---|
committer | Alistair King <alistair@kentik.com> | 2021-01-12 13:56:48 -0800 |
commit | 35e733246e1aff6688f2e4f624c7a80be33fb7b9 (patch) | |
tree | 70d468633cf98e3f5593494e6055e7573fbacc08 | |
parent | 635128d3e56475dfea9a06ab07feca8acf71c16a (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.
-rw-r--r-- | internal/pkg/config/util.go | 2 |
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 { |