bgpd: interface based peers should automatically override it's peer group

When a interface based peer is setup and if it is part of a peer
group we should ignore this and just use the PEER_FLAG_CAPABILITY_ENHE
no matter what.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
Donald Sharp 2018-11-28 18:46:36 -05:00
parent b77004d632
commit dc2f50f378
3 changed files with 13 additions and 10 deletions

View File

@ -2974,7 +2974,7 @@ static int peer_conf_interface_get(struct vty *vty, const char *conf_if,
if (!CHECK_FLAG(peer->flags_invert, PEER_FLAG_CAPABILITY_ENHE)) {
SET_FLAG(peer->flags, PEER_FLAG_CAPABILITY_ENHE);
SET_FLAG(peer->flags_invert, PEER_FLAG_CAPABILITY_ENHE);
UNSET_FLAG(peer->flags_override, PEER_FLAG_CAPABILITY_ENHE);
SET_FLAG(peer->flags_override, PEER_FLAG_CAPABILITY_ENHE);
}
if (peer_group_name) {

View File

@ -7020,14 +7020,17 @@ static void bgp_config_write_peer_global(struct vty *vty, struct bgp *bgp,
/* capability extended-nexthop */
if (peergroup_flag_check(peer, PEER_FLAG_CAPABILITY_ENHE)) {
if (CHECK_FLAG(peer->flags_invert, PEER_FLAG_CAPABILITY_ENHE))
vty_out(vty,
" no neighbor %s capability extended-nexthop\n",
addr);
else
vty_out(vty,
" neighbor %s capability extended-nexthop\n",
addr);
if (!peer->conf_if) {
if (CHECK_FLAG(peer->flags_invert,
PEER_FLAG_CAPABILITY_ENHE))
vty_out(vty,
" no neighbor %s capability extended-nexthop\n",
addr);
else
vty_out(vty,
" neighbor %s capability extended-nexthop\n",
addr);
}
}
/* dont-capability-negotiation */

View File

@ -9,7 +9,7 @@ class TestFlag(frrtest.TestMultiOut):
TestFlag.okfail('peer\\advertisement-interval')
TestFlag.okfail('peer\\capability dynamic')
TestFlag.okfail('peer\\capability extended-nexthop')
TestFlag.okfail('peer\\capability extended-nexthop')
#TestFlag.okfail('peer\\capability extended-nexthop')
TestFlag.okfail('peer\\description')
TestFlag.okfail('peer\\disable-connected-check')
TestFlag.okfail('peer\\dont-capability-negotiate')