diff options
author | Feng Lu <lu.feng@6wind.com> | 2015-05-22 11:40:02 +0200 |
---|---|---|
committer | Vipin Kumar <vipin@cumulusnetworks.com> | 2015-10-30 07:38:03 +0100 |
commit | 78104b9bad14a3185178cedc0dd41d1b1c5db493 (patch) | |
tree | 68f6ae364369a27d9d39b0c76a878f225f3cc259 /zebra/rtread_getmsg.c | |
parent | zebra: show interfaces in a specified VRF or all VRFs (diff) | |
download | frr-78104b9bad14a3185178cedc0dd41d1b1c5db493.tar.xz frr-78104b9bad14a3185178cedc0dd41d1b1c5db493.zip |
zebra: let FIB stand for its respective VRF
A new member "vrf_id" is added to "struct rib", reflecting the VRF
which it belongs to.
A new parameter "vrf_id" is added to the relative functions where
need, except those:
- which already have the parameter "vrf_id"; or
- which have a parameter in type of "struct rib"; or
- which have a parameter in type of "struct interface".
All incoming routes are set to default VRF.
In fact, all routes in FIB are kept in default VRF. And the logic
is not changed.
Signed-off-by: Feng Lu <lu.feng@6wind.com>
Reviewed-by: Alain Ritoux <alain.ritoux@6wind.com>
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Acked-by: Vincent JARDIN <vincent.jardin@6wind.com>
[DL: conflicts fixed + compile warning fix]
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Conflicts:
zebra/connected.c
zebra/kernel_socket.c
zebra/rib.h
zebra/rt_netlink.c
zebra/zebra_rib.c
zebra/zserv.c
Conflicts:
zebra/connected.c
zebra/interface.c
zebra/kernel_socket.c
zebra/rib.h
zebra/rt_netlink.c
zebra/rtread_getmsg.c
zebra/zebra_rib.c
zebra/zebra_vty.c
zebra/zserv.c
Diffstat (limited to 'zebra/rtread_getmsg.c')
-rw-r--r-- | zebra/rtread_getmsg.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/zebra/rtread_getmsg.c b/zebra/rtread_getmsg.c index 17d75b283..f9bfb338a 100644 --- a/zebra/rtread_getmsg.c +++ b/zebra/rtread_getmsg.c @@ -25,6 +25,7 @@ #include "prefix.h" #include "log.h" #include "if.h" +#include "vrf.h" #include "zebra/rib.h" #include "zebra/zserv.h" @@ -90,7 +91,7 @@ handle_route_entry (mib2_ipRouteEntry_t *routeEntry) gateway.s_addr = routeEntry->ipRouteNextHop; rib_add_ipv4 (ZEBRA_ROUTE_KERNEL, 0, zebra_flags, &prefix, - &gateway, NULL, 0, 0, 0, 0, SAFI_UNICAST); + &gateway, NULL, 0, VRF_DEFAULT, 0, 0, 0, SAFI_UNICAST); } void |