Skip to content

Commit

Permalink
bgpd: Send dynamic capability when on/off FQDN capability
Browse files Browse the repository at this point in the history
Signed-off-by: Donatas Abraitis <[email protected]>
  • Loading branch information
ton31337 committed Feb 5, 2024
1 parent 04e2401 commit c8acc67
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions bgpd/bgp_vty.c
Original file line number Diff line number Diff line change
Expand Up @@ -5746,17 +5746,24 @@ DEFPY (neighbor_capability_fqdn,
"Advertise fqdn capability to the peer\n")
{
struct peer *peer;
int ret;

peer = peer_and_group_lookup_vty(vty, neighbor);
if (!peer)
return CMD_WARNING_CONFIG_FAILED;

if (no)
return peer_flag_unset_vty(vty, neighbor,
ret = peer_flag_unset_vty(vty, neighbor,
PEER_FLAG_CAPABILITY_FQDN);
else
return peer_flag_set_vty(vty, neighbor,
ret = peer_flag_set_vty(vty, neighbor,
PEER_FLAG_CAPABILITY_FQDN);

bgp_capability_send(peer, AFI_IP, SAFI_UNICAST, CAPABILITY_CODE_FQDN,
no ? CAPABILITY_ACTION_UNSET
: CAPABILITY_ACTION_SET);

return ret;
}

/* neighbor capability extended next hop encoding */
Expand Down

0 comments on commit c8acc67

Please sign in to comment.