summaryrefslogtreecommitdiff
path: root/ospf6d/ospf6_zebra.c
diff options
context:
space:
mode:
authorKaushik <kaushik@niralnetworks.com>2020-09-01 01:31:49 -0700
committerKaushik <kaushik@niralnetworks.com>2020-09-01 03:02:46 -0700
commitc5d28568c6b71e16fefb3a409159e8fc9742e3f0 (patch)
tree9aa9c4b0944e5f6ed9740c184ca81141edf28f36 /ospf6d/ospf6_zebra.c
parentddffdcf728280246e4ba8ba645d3c1b98763c4e5 (diff)
ospf6d : Preparing for ospf6d VRF support.
1. Removed the VRF_DEFAULT dependency from ospf6d. 2. The dependency on show command still exist will be fixed when the ospf6 master is available. Co-authored-by: Harios <hari@niralnetworks.com> Signed-off-by: Kaushik <kaushik@niralnetworks.com>
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;