mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-05 18:16:43 +00:00
Merge pull request #15301 from opensourcerouting/fix/fqdn_capability_dynamic
bgpd: Send FQDN capability via dynamic capability if enabled
This commit is contained in:
commit
e369d2cca8
@ -1534,7 +1534,8 @@ void bgp_capability_send(struct peer *peer, afi_t afi, safi_t safi,
|
||||
iana_safi2str(pkt_safi));
|
||||
break;
|
||||
case CAPABILITY_CODE_FQDN:
|
||||
if (hostname) {
|
||||
if (CHECK_FLAG(peer->flags, PEER_FLAG_CAPABILITY_FQDN) &&
|
||||
hostname) {
|
||||
SET_FLAG(peer->cap, PEER_CAP_HOSTNAME_ADV);
|
||||
stream_putc(s, action);
|
||||
stream_putc(s, CAPABILITY_CODE_FQDN);
|
||||
|
@ -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 */
|
||||
|
@ -4574,7 +4574,7 @@ static const struct peer_flag_action peer_flag_action_list[] = {
|
||||
{PEER_FLAG_AIGP, 0, peer_change_none},
|
||||
{PEER_FLAG_GRACEFUL_SHUTDOWN, 0, peer_change_none},
|
||||
{PEER_FLAG_CAPABILITY_SOFT_VERSION, 0, peer_change_none},
|
||||
{PEER_FLAG_CAPABILITY_FQDN, 0, peer_change_reset},
|
||||
{PEER_FLAG_CAPABILITY_FQDN, 0, peer_change_none},
|
||||
{0, 0, 0}};
|
||||
|
||||
static const struct peer_flag_action peer_af_flag_action_list[] = {
|
||||
|
Loading…
Reference in New Issue
Block a user