]> git.proxmox.com Git - mirror_frr.git/commitdiff
bgpd: permit bgp vrf socket creation on some cases
authorPhilippe Guibert <philippe.guibert@6wind.com>
Tue, 6 Mar 2018 17:10:27 +0000 (18:10 +0100)
committerPhilippe Guibert <philippe.guibert@6wind.com>
Tue, 6 Mar 2018 17:18:32 +0000 (18:18 +0100)
When VRF is not yet available at startup, the check for main socket
presence must be done. As the main socket creation is made in a separate
place from vrf socket for netns, ths main socket creation must not be
prevented when a BGP VRF relies on vrf lite mechanism.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
bgpd/bgpd.c

index c06339aad9e4616ee477607e07f8902db553f83c..e8ea2b717f4978171f22c296efb3396b76c283a0 100644 (file)
@@ -108,7 +108,8 @@ static int bgp_check_main_socket(bool create, struct bgp *bgp)
        struct listnode *bgpnode, *nbgpnode;
        struct bgp *bgp_temp;
 
-       if (bgp->inst_type == BGP_INSTANCE_TYPE_VRF)
+       if (bgp->inst_type == BGP_INSTANCE_TYPE_VRF &&
+           vrf_is_mapped_on_netns(bgp->vrf_id))
                return 0;
        if (create == true) {
                if (bgp_server_main_created)