From: Philippe Guibert Date: Mon, 11 Feb 2019 13:04:52 +0000 (+0100) Subject: bgpd: if vrf is unknown, bgp deletion not complete X-Git-Tag: 7.1_pulled~253^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=ee66b77f0e8df69034a15564cc433e70b5adb65e;p=matthieu%2Ffrr.git bgpd: if vrf is unknown, bgp deletion not complete there are some cases where the bgp deletion will not be complete, while the vrf identifier of the bgp instance is not completely identified. The vrf search based on the bgp name is the better protection, since the bgp vrf instance is created, even if the vrf identifier is not yet known. Signed-off-by: Philippe Guibert --- diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c index aceb990534..0ff9d75781 100644 --- a/bgpd/bgpd.c +++ b/bgpd/bgpd.c @@ -7857,9 +7857,11 @@ void bgp_master_init(struct thread_master *master) */ static void bgp_if_finish(struct bgp *bgp) { - struct vrf *vrf = vrf_lookup_by_id(bgp->vrf_id); + struct vrf *vrf; struct interface *ifp; + vrf = bgp_vrf_lookup_by_instance_type(bgp); + if (bgp->inst_type == BGP_INSTANCE_TYPE_VIEW || !vrf) return;