diff options
Diffstat (limited to 'table')
-rw-r--r-- | table/path.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/table/path.go b/table/path.go index 38c8443a..b2c9bb55 100644 --- a/table/path.go +++ b/table/path.go @@ -99,6 +99,13 @@ func (path *Path) UpdatePathAttrs(global *config.Global, peer *config.Neighbor) if idx >= 0 && !path.IsLocal() { path.pathAttrs = append(path.pathAttrs[:idx], path.pathAttrs[idx+1:]...) } + + // remove local-pref attribute + idx, _ = path.getPathAttr(bgp.BGP_ATTR_TYPE_LOCAL_PREF) + if idx >= 0 && !config.IsConfederationMember(global, peer) { + path.pathAttrs = append(path.pathAttrs[:idx], path.pathAttrs[idx+1:]...) + } + } else if peer.NeighborConfig.PeerType == config.PEER_TYPE_INTERNAL { // NEXTHOP handling for iBGP // if the path generated locally set local address as nexthop. |