summaryrefslogtreecommitdiffstats
path: root/zebra/zebra_rib.c
diff options
context:
space:
mode:
Diffstat (limited to 'zebra/zebra_rib.c')
-rw-r--r--zebra/zebra_rib.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c
index 8bd4ecc8..68ae397b 100644
--- a/zebra/zebra_rib.c
+++ b/zebra/zebra_rib.c
@@ -2290,7 +2290,7 @@ static_install_ipv4 (safi_t safi, struct prefix *p, struct static_ipv4 *si)
struct route_table *table;
/* Lookup table. */
- table = zebra_vrf_table (AFI_IP, safi, VRF_DEFAULT);
+ table = zebra_vrf_table (AFI_IP, safi, si->vrf_id);
if (! table)
return;
@@ -2332,7 +2332,7 @@ static_install_ipv4 (safi_t safi, struct prefix *p, struct static_ipv4 *si)
rib->type = ZEBRA_ROUTE_STATIC;
rib->distance = si->distance;
rib->metric = 0;
- rib->vrf_id = VRF_DEFAULT;
+ rib->vrf_id = si->vrf_id;
rib->table = zebrad.rtm_table_default;
rib->nexthop_num = 0;
@@ -2384,7 +2384,7 @@ static_uninstall_ipv4 (safi_t safi, struct prefix *p, struct static_ipv4 *si)
struct route_table *table;
/* Lookup table. */
- table = zebra_vrf_table (AFI_IP, safi, VRF_DEFAULT);
+ table = zebra_vrf_table (AFI_IP, safi, si->vrf_id);
if (! table)
return;
@@ -2490,6 +2490,7 @@ static_add_ipv4_safi (safi_t safi, struct prefix *p, struct in_addr *gate,
si->type = type;
si->distance = distance;
si->flags = flags;
+ si->vrf_id = vrf_id;
if (gate)
si->gate.ipv4 = *gate;
@@ -2836,7 +2837,7 @@ static_install_ipv6 (struct prefix *p, struct static_ipv6 *si)
struct route_node *rn;
/* Lookup table. */
- table = zebra_vrf_table (AFI_IP6, SAFI_UNICAST, VRF_DEFAULT);
+ table = zebra_vrf_table (AFI_IP6, SAFI_UNICAST, si->vrf_id);
if (! table)
return;
@@ -2879,7 +2880,7 @@ static_install_ipv6 (struct prefix *p, struct static_ipv6 *si)
rib->type = ZEBRA_ROUTE_STATIC;
rib->distance = si->distance;
rib->metric = 0;
- rib->vrf_id = VRF_DEFAULT;
+ rib->vrf_id = si->vrf_id;
rib->table = zebrad.rtm_table_default;
rib->nexthop_num = 0;
@@ -2932,7 +2933,7 @@ static_uninstall_ipv6 (struct prefix *p, struct static_ipv6 *si)
struct nexthop *nexthop;
/* Lookup table. */
- table = zebra_vrf_table (AFI_IP6, SAFI_UNICAST, VRF_DEFAULT);
+ table = zebra_vrf_table (AFI_IP6, SAFI_UNICAST, si->vrf_id);
if (! table)
return;
@@ -3031,6 +3032,7 @@ static_add_ipv6 (struct prefix *p, u_char type, struct in6_addr *gate,
si->type = type;
si->distance = distance;
si->flags = flags;
+ si->vrf_id = vrf_id;
switch (type)
{