]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bgpd: if vrf is unknown, bgp deletion not complete
authorPhilippe Guibert <philippe.guibert@6wind.com>
Mon, 11 Feb 2019 13:04:52 +0000 (14:04 +0100)
committerPhilippe Guibert <philippe.guibert@6wind.com>
Mon, 11 Feb 2019 13:04:52 +0000 (14:04 +0100)
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 <philippe.guibert@6wind.com>
bgpd/bgpd.c

index aceb990534c1de4f50c15b240a47b1066d73f364..0ff9d75781b2956d80273db6c648dbb9854a5db6 100644 (file)
@@ -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;