]> git.proxmox.com Git - mirror_frr.git/commitdiff
bgpd, ospfd, zebra: Do not use 0 as VRF_DEFAULT
authorDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 9 Jan 2020 21:57:35 +0000 (16:57 -0500)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 15 Jan 2020 13:29:36 +0000 (08:29 -0500)
Explicitly spell out what we are trying to do.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
bgpd/bgp_pbr.c
ospfd/ospf_vty.c
zebra/rt_netlink.c
zebra/zapi_msg.c
zebra/zebra_nhg.c

index 83194e010a4e5d5a14ceaa5688e3b9dad0ebcdb3..14f5fefb2020955cf544a93448bd857a8e1e3c62 100644 (file)
@@ -1725,7 +1725,7 @@ static void bgp_pbr_policyroute_remove_from_zebra_unit(
                        temp.type = IPSET_NET_NET;
        }
        if (bpf->vrf_id == VRF_UNKNOWN) /* XXX case BGP destroy */
-               temp.vrf_id = 0;
+               temp.vrf_id = VRF_DEFAULT;
        else
                temp.vrf_id = bpf->vrf_id;
        bpme = &temp2;
index 152a7e83b71b0fd0fefacb726e34d5dad0c2e9a0..1542ef88fb9ad3eeedb8e7dadfc1d360af78151a 100644 (file)
@@ -9679,7 +9679,7 @@ DEFUN (show_ip_ospf_vrfs,
                if (uj)
                        json_vrf = json_object_new_object();
 
-               if (ospf->vrf_id == 0)
+               if (ospf->vrf_id == VRF_DEFAULT)
                        name = VRF_DEFAULT_NAME;
                else
                        name = ospf->name;
index 29a341abbd9b4e3d3ce00b1697c78d585e2d35ab..dd6e62ee6c8569a215a1f6904f84b42bd5d6baeb 100644 (file)
@@ -2353,7 +2353,7 @@ int netlink_nexthop_change(struct nlmsghdr *h, ns_id_t ns_id, int startup)
        unsigned char family;
        int type;
        afi_t afi = AFI_UNSPEC;
-       vrf_id_t vrf_id = 0;
+       vrf_id_t vrf_id = VRF_DEFAULT;
        struct interface *ifp = NULL;
        struct nhmsg *nhm = NULL;
        struct nexthop nh = {};
index 651babdebac59b82483c5aa67a959d9c330f447c..af44768a51e3ace4932a424a256e61e89829e7e3 100644 (file)
@@ -1416,7 +1416,7 @@ static void zread_route_add(ZAPI_HANDLER_ARGS)
        struct nexthop *nexthop = NULL;
        struct nexthop_group *ng = NULL;
        int i, ret;
-       vrf_id_t vrf_id = 0;
+       vrf_id_t vrf_id;
        struct ipaddr vtep_ip;
 
        s = msg;
index 4f41406a5ca69d775029dac091b0968e614b9c18..c0888e298b334523004d97c2bd1d4e511ae39b4f 100644 (file)
@@ -507,7 +507,7 @@ static bool zebra_nhg_find(struct nhg_hash_entry **nhe, uint32_t id,
        if (lookup.nhg->nexthop->next) {
                /* Groups can have all vrfs and AF's in them */
                lookup.afi = AFI_UNSPEC;
-               lookup.vrf_id = 0;
+               lookup.vrf_id = VRF_DEFAULT;
        } else {
                switch (lookup.nhg->nexthop->type) {
                case (NEXTHOP_TYPE_IFINDEX):