summaryrefslogtreecommitdiff
path: root/ospf6d/ospf6_zebra.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2020-09-02 08:25:09 -0400
committerGitHub <noreply@github.com>2020-09-02 08:25:09 -0400
commitb0d39af982854de9fcad7960804b8ca82a664158 (patch)
tree068802be000e463be3550cbbba73c5525400adbc /ospf6d/ospf6_zebra.c
parent4223956546963c3f1a918efc6d3a5c0da875c7e7 (diff)
parentc5d28568c6b71e16fefb3a409159e8fc9742e3f0 (diff)
Merge pull request #7027 from Niral-Networks/niral_dev_vrf_ospf6
ospf6d : Preparing for ospf6d VRF support.
Diffstat (limited to 'ospf6d/ospf6_zebra.c')
-rw-r--r--ospf6d/ospf6_zebra.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/ospf6d/ospf6_zebra.c b/ospf6d/ospf6_zebra.c
index 2773a666a3..62e0e149b8 100644
--- a/ospf6d/ospf6_zebra.c
+++ b/ospf6d/ospf6_zebra.c
@@ -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;