mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-09 11:18:52 +00:00
bgpd: Fix no
form for neighbor X capability software-version
If `bgp default software-version-capability` is enabled, allow unsetting this
for a single neighbor also.
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
(cherry picked from commit 2038fad33e
)
This commit is contained in:
parent
e4885819f5
commit
baf24d2fec
@ -1951,7 +1951,6 @@ uint16_t bgp_open_capability(struct stream *s, struct peer *peer,
|
|||||||
* or disable its use, and that switch MUST be off by default.
|
* or disable its use, and that switch MUST be off by default.
|
||||||
*/
|
*/
|
||||||
if (peergroup_flag_check(peer, PEER_FLAG_CAPABILITY_SOFT_VERSION) ||
|
if (peergroup_flag_check(peer, PEER_FLAG_CAPABILITY_SOFT_VERSION) ||
|
||||||
CHECK_FLAG(peer->bgp->flags, BGP_FLAG_SOFT_VERSION_CAPABILITY) ||
|
|
||||||
peer->sort == BGP_PEER_IBGP || peer->sub_sort == BGP_PEER_EBGP_OAD) {
|
peer->sort == BGP_PEER_IBGP || peer->sub_sort == BGP_PEER_EBGP_OAD) {
|
||||||
SET_FLAG(peer->cap, PEER_CAP_SOFT_VERSION_ADV);
|
SET_FLAG(peer->cap, PEER_CAP_SOFT_VERSION_ADV);
|
||||||
stream_putc(s, BGP_OPEN_OPT_CAP);
|
stream_putc(s, BGP_OPEN_OPT_CAP);
|
||||||
|
@ -18238,9 +18238,19 @@ static void bgp_config_write_peer_global(struct vty *vty, struct bgp *bgp,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* capability software-version */
|
/* capability software-version */
|
||||||
if (peergroup_flag_check(peer, PEER_FLAG_CAPABILITY_SOFT_VERSION))
|
if (CHECK_FLAG(bgp->flags, BGP_FLAG_SOFT_VERSION_CAPABILITY)) {
|
||||||
vty_out(vty, " neighbor %s capability software-version\n",
|
if (!peergroup_flag_check(peer,
|
||||||
|
PEER_FLAG_CAPABILITY_SOFT_VERSION))
|
||||||
|
vty_out(vty,
|
||||||
|
" no neighbor %s capability software-version\n",
|
||||||
addr);
|
addr);
|
||||||
|
} else {
|
||||||
|
if (peergroup_flag_check(peer,
|
||||||
|
PEER_FLAG_CAPABILITY_SOFT_VERSION))
|
||||||
|
vty_out(vty,
|
||||||
|
" neighbor %s capability software-version\n",
|
||||||
|
addr);
|
||||||
|
}
|
||||||
|
|
||||||
/* dont-capability-negotiation */
|
/* dont-capability-negotiation */
|
||||||
if (peergroup_flag_check(peer, PEER_FLAG_DONT_CAPABILITY))
|
if (peergroup_flag_check(peer, PEER_FLAG_DONT_CAPABILITY))
|
||||||
|
@ -1539,6 +1539,9 @@ struct peer *peer_new(struct bgp *bgp)
|
|||||||
if (CHECK_FLAG(bgp->flags, BGP_FLAG_ENFORCE_FIRST_AS))
|
if (CHECK_FLAG(bgp->flags, BGP_FLAG_ENFORCE_FIRST_AS))
|
||||||
SET_FLAG(peer->flags, PEER_FLAG_ENFORCE_FIRST_AS);
|
SET_FLAG(peer->flags, PEER_FLAG_ENFORCE_FIRST_AS);
|
||||||
|
|
||||||
|
if (CHECK_FLAG(bgp->flags, BGP_FLAG_SOFT_VERSION_CAPABILITY))
|
||||||
|
SET_FLAG(peer->flags, PEER_FLAG_CAPABILITY_SOFT_VERSION);
|
||||||
|
|
||||||
SET_FLAG(peer->flags_invert, PEER_FLAG_CAPABILITY_FQDN);
|
SET_FLAG(peer->flags_invert, PEER_FLAG_CAPABILITY_FQDN);
|
||||||
SET_FLAG(peer->flags, PEER_FLAG_CAPABILITY_FQDN);
|
SET_FLAG(peer->flags, PEER_FLAG_CAPABILITY_FQDN);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user