summaryrefslogtreecommitdiffstats
path: root/zebra/connected.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2018-02-08 15:12:12 +0100
committerDonald Sharp <sharpd@cumulusnetworks.com>2018-02-09 01:35:53 +0100
commit4a7371e9e21569eee0e728f64ea06870d1aafa5e (patch)
tree15d90068bac9ca5259e6e63b5df7cac7747df08f /zebra/connected.c
parentMerge pull request #1722 from donaldsharp/vrf_mc_vrf (diff)
downloadfrr-4a7371e9e21569eee0e728f64ea06870d1aafa5e.tar.xz
frr-4a7371e9e21569eee0e728f64ea06870d1aafa5e.zip
*: Track vrfs per nexthop not per route entry
Track the vfrs on a per nexthop basis instead of on a per route entry basis. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'zebra/connected.c')
-rw-r--r--zebra/connected.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/zebra/connected.c b/zebra/connected.c
index d34fd9021..e28ec8d09 100644
--- a/zebra/connected.c
+++ b/zebra/connected.c
@@ -203,7 +203,9 @@ void connected_up(struct interface *ifp, struct connected *ifc)
afi_t afi;
struct prefix p;
struct nexthop nh = {
- .type = NEXTHOP_TYPE_IFINDEX, .ifindex = ifp->ifindex,
+ .type = NEXTHOP_TYPE_IFINDEX,
+ .ifindex = ifp->ifindex,
+ .vrf_id = ifp->vrf_id,
};
if (!CHECK_FLAG(ifc->conf, ZEBRA_IFC_REAL))
@@ -238,13 +240,11 @@ void connected_up(struct interface *ifp, struct connected *ifc)
break;
}
- rib_add(afi, SAFI_UNICAST, ifp->vrf_id, ifp->vrf_id,
- ZEBRA_ROUTE_CONNECT, 0, 0,
- &p, NULL, &nh, RT_TABLE_MAIN, ifp->metric, 0, 0, 0);
+ rib_add(afi, SAFI_UNICAST, ifp->vrf_id, ZEBRA_ROUTE_CONNECT, 0, 0, &p,
+ NULL, &nh, RT_TABLE_MAIN, ifp->metric, 0, 0, 0);
- rib_add(afi, SAFI_MULTICAST, ifp->vrf_id, ifp->vrf_id,
- ZEBRA_ROUTE_CONNECT, 0, 0,
- &p, NULL, &nh, RT_TABLE_MAIN, ifp->metric, 0, 0, 0);
+ rib_add(afi, SAFI_MULTICAST, ifp->vrf_id, ZEBRA_ROUTE_CONNECT, 0, 0, &p,
+ NULL, &nh, RT_TABLE_MAIN, ifp->metric, 0, 0, 0);
if (IS_ZEBRA_DEBUG_RIB_DETAILED) {
char buf[PREFIX_STRLEN];
@@ -362,7 +362,9 @@ void connected_down(struct interface *ifp, struct connected *ifc)
afi_t afi;
struct prefix p;
struct nexthop nh = {
- .type = NEXTHOP_TYPE_IFINDEX, .ifindex = ifp->ifindex,
+ .type = NEXTHOP_TYPE_IFINDEX,
+ .ifindex = ifp->ifindex,
+ .vrf_id = ifp->vrf_id,
};
if (!CHECK_FLAG(ifc->conf, ZEBRA_IFC_REAL))