]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: fix radv interface disabled when bgp instance removed
authorPhilippe Guibert <philippe.guibert@6wind.com>
Thu, 6 Mar 2025 15:53:08 +0000 (16:53 +0100)
committerDmytro Shytyi <dmytro.shytyi@6wind.com>
Mon, 17 Mar 2025 10:19:58 +0000 (11:19 +0100)
If a peer uses radv for an interface, and bgp instance is removed,
then the radv service is not disabled on the interface.

Fix this by doing the same at BGP unconfiguration. Like it has been
done when a peer is unconfigured, call the radv unregistration before
deleting the peer.

Fixes: b3a3290e2303 ("bgpd: turn off RAs when numbered peers are deleted")
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Signed-off-by: Dmytro Shytyi <dmytro.shytyi@6wind.com>
bgpd/bgpd.c

index 6a56eb45987b215a8bc5755db8a0f21c412e73ff..0f31719daf847f0e67b5aef0feac8534509fb88a 100644 (file)
@@ -4199,6 +4199,10 @@ int bgp_delete(struct bgp *bgp)
 
        while (listcount(bgp->peer)) {
                peer = listnode_head(bgp->peer);
+               if (peer->ifp || CHECK_FLAG(peer->flags, PEER_FLAG_CAPABILITY_ENHE))
+                       bgp_zebra_terminate_radv(peer->bgp, peer);
+
+               peer_notify_unconfig(peer->connection);
                peer_delete(peer);
        }