]> git.proxmox.com Git - mirror_frr.git/blobdiff - ospf6d/ospf6_zebra.c
Merge pull request #7054 from qlyoung/fix-bgp-mplsvpn-nlri-missing-length-checks
[mirror_frr.git] / ospf6d / ospf6_zebra.c
index 2773a666a3f0d3bf421bd0f731b4a5f4fabc54c5..62e0e149b86e51c6e21e5c699c88d03379c5ca76 100644 (file)
@@ -75,25 +75,25 @@ static int ospf6_router_id_update_zebra(ZAPI_CALLBACK_ARGS)
 }
 
 /* redistribute function */
-void ospf6_zebra_redistribute(int type)
+void ospf6_zebra_redistribute(int type, vrf_id_t vrf_id)
 {
-       if (vrf_bitmap_check(zclient->redist[AFI_IP6][type], VRF_DEFAULT))
+       if (vrf_bitmap_check(zclient->redist[AFI_IP6][type], vrf_id))
                return;
-       vrf_bitmap_set(zclient->redist[AFI_IP6][type], VRF_DEFAULT);
+       vrf_bitmap_set(zclient->redist[AFI_IP6][type], vrf_id);
 
        if (zclient->sock > 0)
                zebra_redistribute_send(ZEBRA_REDISTRIBUTE_ADD, zclient,
-                                       AFI_IP6, type, 0, VRF_DEFAULT);
+                                       AFI_IP6, type, 0, vrf_id);
 }
 
-void ospf6_zebra_no_redistribute(int type)
+void ospf6_zebra_no_redistribute(int type, vrf_id_t vrf_id)
 {
-       if (!vrf_bitmap_check(zclient->redist[AFI_IP6][type], VRF_DEFAULT))
+       if (!vrf_bitmap_check(zclient->redist[AFI_IP6][type], vrf_id))
                return;
-       vrf_bitmap_unset(zclient->redist[AFI_IP6][type], VRF_DEFAULT);
+       vrf_bitmap_unset(zclient->redist[AFI_IP6][type], vrf_id);
        if (zclient->sock > 0)
                zebra_redistribute_send(ZEBRA_REDISTRIBUTE_DELETE, zclient,
-                                       AFI_IP6, type, 0, VRF_DEFAULT);
+                                       AFI_IP6, type, 0, vrf_id);
 }
 
 static int ospf6_zebra_if_address_update_add(ZAPI_CALLBACK_ARGS)
@@ -279,7 +279,7 @@ static void ospf6_zebra_route_update(int type, struct ospf6_route *request)
        dest = &request->prefix;
 
        memset(&api, 0, sizeof(api));
-       api.vrf_id = VRF_DEFAULT;
+       api.vrf_id = ospf6->vrf_id;
        api.type = ZEBRA_ROUTE_OSPF6;
        api.safi = SAFI_UNICAST;
        api.prefix = *dest;
@@ -330,7 +330,7 @@ void ospf6_zebra_add_discard(struct ospf6_route *request)
 
        if (!CHECK_FLAG(request->flag, OSPF6_ROUTE_BLACKHOLE_ADDED)) {
                memset(&api, 0, sizeof(api));
-               api.vrf_id = VRF_DEFAULT;
+               api.vrf_id = ospf6->vrf_id;
                api.type = ZEBRA_ROUTE_OSPF6;
                api.safi = SAFI_UNICAST;
                api.prefix = *dest;
@@ -363,7 +363,7 @@ void ospf6_zebra_delete_discard(struct ospf6_route *request)
 
        if (CHECK_FLAG(request->flag, OSPF6_ROUTE_BLACKHOLE_ADDED)) {
                memset(&api, 0, sizeof(api));
-               api.vrf_id = VRF_DEFAULT;
+               api.vrf_id = ospf6->vrf_id;
                api.type = ZEBRA_ROUTE_OSPF6;
                api.safi = SAFI_UNICAST;
                api.prefix = *dest;