]> git.proxmox.com Git - mirror_frr.git/commitdiff
bgpd: peer groups should not toggle interface based nht tracking
authorDonald Sharp <sharpd@nvidia.com>
Tue, 3 May 2022 19:24:28 +0000 (15:24 -0400)
committerDonald Sharp <sharpd@nvidia.com>
Wed, 4 May 2022 11:51:20 +0000 (07:51 -0400)
Peer groups when various forms of `bgp capability extended-nexthop`
is entered on them are toggling the nexthop tracking status of peers
in their peer group.  This is ok when the peer is not interface based.
But it is not ok when the peer is interface based as that it will turn
off the ability of FRR to properly work with that peer type.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
bgpd/bgpd.c

index 38fc51f507ce931d033017e4f46622cbcd9d8576..0b63dbe74b9ee2c13072418fb18031e430d143a2 100644 (file)
@@ -4487,7 +4487,9 @@ static int peer_flag_modify(struct peer *peer, uint32_t flag, int set)
                        if (set) {
                                bgp_zebra_initiate_radv(peer->bgp, peer);
                        } else if (peer_group_active(peer)) {
-                               if (!CHECK_FLAG(peer->group->conf->flags, flag))
+                               if (!CHECK_FLAG(peer->group->conf->flags,
+                                               flag) &&
+                                   !peer->conf_if)
                                        bgp_zebra_terminate_radv(peer->bgp,
                                                                 peer);
                        } else
@@ -4525,7 +4527,7 @@ static int peer_flag_modify(struct peer *peer, uint32_t flag, int set)
                /* Update flag on peer-group member. */
                COND_FLAG(member->flags, flag, set != member_invert);
 
-               if (flag == PEER_FLAG_CAPABILITY_ENHE)
+               if (flag == PEER_FLAG_CAPABILITY_ENHE && !member->conf_if)
                        set ? bgp_zebra_initiate_radv(member->bgp, member)
                            : bgp_zebra_terminate_radv(member->bgp, member);