summaryrefslogtreecommitdiffstats
path: root/zebra/rt_netlink.c
diff options
context:
space:
mode:
Diffstat (limited to 'zebra/rt_netlink.c')
-rw-r--r--zebra/rt_netlink.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c
index 45ebf20e..cf6ce0cd 100644
--- a/zebra/rt_netlink.c
+++ b/zebra/rt_netlink.c
@@ -36,6 +36,7 @@
#include "rib.h"
#include "thread.h"
#include "privs.h"
+#include "vrf.h"
#include "zebra/zserv.h"
#include "zebra/rt.h"
@@ -743,7 +744,7 @@ netlink_routing_table (struct sockaddr_nl *snl, struct nlmsghdr *h)
if (!tb[RTA_MULTIPATH])
rib_add_ipv4 (ZEBRA_ROUTE_KERNEL, flags, &p, gate, src, index,
- table, metric, 0, SAFI_UNICAST);
+ VRF_DEFAULT, table, metric, 0, SAFI_UNICAST);
else
{
/* This is a multipath route */
@@ -759,6 +760,7 @@ netlink_routing_table (struct sockaddr_nl *snl, struct nlmsghdr *h)
rib->distance = 0;
rib->flags = flags;
rib->metric = metric;
+ rib->vrf_id = VRF_DEFAULT;
rib->table = table;
rib->nexthop_num = 0;
rib->uptime = time (NULL);
@@ -808,8 +810,8 @@ netlink_routing_table (struct sockaddr_nl *snl, struct nlmsghdr *h)
memcpy (&p.prefix, dest, 16);
p.prefixlen = rtm->rtm_dst_len;
- rib_add_ipv6 (ZEBRA_ROUTE_KERNEL, flags, &p, gate, index, table,
- metric, 0, SAFI_UNICAST);
+ rib_add_ipv6 (ZEBRA_ROUTE_KERNEL, flags, &p, gate, index, VRF_DEFAULT,
+ table, metric, 0, SAFI_UNICAST);
}
#endif /* HAVE_IPV6 */
@@ -942,8 +944,8 @@ netlink_route_change (struct sockaddr_nl *snl, struct nlmsghdr *h)
if (h->nlmsg_type == RTM_NEWROUTE)
{
if (!tb[RTA_MULTIPATH])
- rib_add_ipv4 (ZEBRA_ROUTE_KERNEL, 0, &p, gate, src, index, table,
- metric, 0, SAFI_UNICAST);
+ rib_add_ipv4 (ZEBRA_ROUTE_KERNEL, 0, &p, gate, src, index, VRF_DEFAULT,
+ table, metric, 0, SAFI_UNICAST);
else
{
/* This is a multipath route */
@@ -959,6 +961,7 @@ netlink_route_change (struct sockaddr_nl *snl, struct nlmsghdr *h)
rib->distance = 0;
rib->flags = 0;
rib->metric = metric;
+ rib->vrf_id = VRF_DEFAULT;
rib->table = table;
rib->nexthop_num = 0;
rib->uptime = time (NULL);
@@ -1001,7 +1004,8 @@ netlink_route_change (struct sockaddr_nl *snl, struct nlmsghdr *h)
}
}
else
- rib_delete_ipv4 (ZEBRA_ROUTE_KERNEL, 0, &p, gate, index, table, SAFI_UNICAST);
+ rib_delete_ipv4 (ZEBRA_ROUTE_KERNEL, 0, &p, gate, index, VRF_DEFAULT,
+ SAFI_UNICAST);
}
#ifdef HAVE_IPV6
@@ -1022,9 +1026,11 @@ netlink_route_change (struct sockaddr_nl *snl, struct nlmsghdr *h)
}
if (h->nlmsg_type == RTM_NEWROUTE)
- rib_add_ipv6 (ZEBRA_ROUTE_KERNEL, 0, &p, gate, index, table, metric, 0, SAFI_UNICAST);
+ rib_add_ipv6 (ZEBRA_ROUTE_KERNEL, 0, &p, gate, index, VRF_DEFAULT, table,
+ metric, 0, SAFI_UNICAST);
else
- rib_delete_ipv6 (ZEBRA_ROUTE_KERNEL, 0, &p, gate, index, table, SAFI_UNICAST);
+ rib_delete_ipv6 (ZEBRA_ROUTE_KERNEL, 0, &p, gate, index, VRF_DEFAULT,
+ SAFI_UNICAST);
}
#endif /* HAVE_IPV6 */