diff options
author | Feng Lu <lu.feng@6wind.com> | 2015-05-22 11:40:02 +0200 |
---|---|---|
committer | David Lamparter <equinox@opensourcerouting.org> | 2015-06-02 07:46:17 +0200 |
commit | 0d0686f98e64017415071e590bde262f0ab5a4c9 (patch) | |
tree | a8ffef2548d24ce9a7662a20573d2a26a8e17142 /zebra/rtread_getmsg.c | |
parent | a2854770ff839553c9444193e84a1593645fa848 (diff) | |
download | quagga-0d0686f98e64017415071e590bde262f0ab5a4c9.tar.bz2 quagga-0d0686f98e64017415071e590bde262f0ab5a4c9.tar.xz |
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>
Diffstat (limited to 'zebra/rtread_getmsg.c')
-rw-r--r-- | zebra/rtread_getmsg.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/zebra/rtread_getmsg.c b/zebra/rtread_getmsg.c index 81bf0de6..83ef6483 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,8 @@ handle_route_entry (mib2_ipRouteEntry_t *routeEntry) gateway.s_addr = routeEntry->ipRouteNextHop; rib_add_ipv4 (ZEBRA_ROUTE_KERNEL, zebra_flags, &prefix, - &gateway, NULL, 0, 0, 0, 0, SAFI_UNICAST); + &gateway, NULL, 0, VRF_DEFAULT, RT_TABLE_MAIN, + 0, 0, SAFI_UNICAST); } void |