Skip to content

Commit

Permalink
Merge pull request #4098 from donaldsharp/override_intf_7.0
Browse files Browse the repository at this point in the history
[7.0]bgpd: interface based peers should automatically override it's peer g…
  • Loading branch information
riw777 committed Apr 11, 2019
2 parents fac5795 + ab7fb13 commit 799dae6
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion bgpd/bgp_vty.c
Expand Up @@ -2971,7 +2971,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) {
Expand Down
19 changes: 11 additions & 8 deletions bgpd/bgpd.c
Expand Up @@ -7032,14 +7032,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 */
Expand Down
2 changes: 1 addition & 1 deletion tests/bgpd/test_peer_attr.py
Expand Up @@ -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')
Expand Down

0 comments on commit 799dae6

Please sign in to comment.