]> git.puffer.fish Git - mirror/frr.git/commit
bgpd: update route leaking when a VRF loopback is received
authorLouis Scalbert <louis.scalbert@6wind.com>
Tue, 26 Apr 2022 14:57:45 +0000 (16:57 +0200)
committerLouis Scalbert <louis.scalbert@6wind.com>
Fri, 16 Dec 2022 13:52:47 +0000 (14:52 +0100)
commit6030b8b40d1f09787040b418162bb8a15e25bf66
treef5467033a7436415567577a6c5cbf0da429e118d
parent6b74c9fa660556f53e9592bdaa492d2466db3c3c
bgpd: update route leaking when a VRF loopback is received

At bgpd startup, VRF instances are sent from zebra before the
interfaces. When importing a l3vpn prefix from another local VRF
instance, the interfaces are not known yet. The prefix nexthop interface
cannot be set to the loopback or the VRF interface, which causes setting
invalid routes in zebra.

Update route leaking when the loopback or a VRF interface is received
from zebra.

At a VRF interface deletion, zebra voluntarily sends a
ZEBRA_INTERFACE_ADD message to move it to VRF_DEFAULT. Do not update if
such a message is received. VRF destruction will destroy all the related
routes without adding codes.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
bgpd/bgp_attr.c
bgpd/bgp_attr.h
bgpd/bgp_mplsvpn.c
bgpd/bgp_route.c
bgpd/bgp_zebra.c