summaryrefslogtreecommitdiff
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 0f25c76858..2b94c6a7c6 100644
--- a/zebra/zebra_rib.c
+++ b/zebra/zebra_rib.c
@@ -2689,7 +2689,7 @@ static_install_ipv4 (struct prefix *p, struct static_ipv4 *si)
struct prefix nh_p;
/* Lookup table. */
- table = zebra_vrf_table (AFI_IP, SAFI_UNICAST, VRF_DEFAULT);
+ table = zebra_vrf_table (AFI_IP, SAFI_UNICAST, si->vrf_id);
if (! table)
return;
@@ -2740,7 +2740,7 @@ static_install_ipv4 (struct prefix *p, struct static_ipv4 *si)
rib->instance = 0;
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;
rib->tag = si->tag;
@@ -2798,7 +2798,7 @@ static_uninstall_ipv4 (struct prefix *p, struct static_ipv4 *si)
struct prefix nh_p;
/* Lookup table. */
- table = zebra_vrf_table (AFI_IP, SAFI_UNICAST, VRF_DEFAULT);
+ table = zebra_vrf_table (AFI_IP, SAFI_UNICAST, si->vrf_id);
if (! table)
return;
@@ -2928,6 +2928,7 @@ static_add_ipv4 (struct prefix *p, struct in_addr *gate, const char *ifname,
si->distance = distance;
si->flags = flags;
si->tag = tag;
+ si->vrf_id = vrf_id;
if (gate)
si->gate.ipv4 = *gate;
@@ -3454,7 +3455,7 @@ static_install_ipv6 (struct prefix *p, struct static_ipv6 *si)
struct prefix nh_p;
/* 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;
@@ -3506,7 +3507,7 @@ static_install_ipv6 (struct prefix *p, struct static_ipv6 *si)
rib->instance = 0;
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;
rib->tag = si->tag;
@@ -3565,7 +3566,7 @@ static_uninstall_ipv6 (struct prefix *p, struct static_ipv6 *si)
struct prefix nh_p;
/* 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;
@@ -3686,6 +3687,7 @@ static_add_ipv6 (struct prefix *p, u_char type, struct in6_addr *gate,
si->distance = distance;
si->flags = flags;
si->tag = tag;
+ si->vrf_id = vrf_id;
switch (type)
{