summaryrefslogtreecommitdiff
path: root/zebra/connected.c
diff options
context:
space:
mode:
authorG.Balaji <balajig81@gmail.com>2012-04-02 23:31:29 +0530
committerDavid Lamparter <equinox@diac24.net>2012-05-02 17:13:49 +0200
commit42cb6b6655d0cc141374ec373220d244f81fbba0 (patch)
treee4161a0645594a56713ac939dd450f598aeb0592 /zebra/connected.c
parenta4c06dec1ebe41dd4444d387478500e6022e2209 (diff)
zebra: feed Connected routes into MRIB
The SAFI_MULTICAST RIB needs to contain Connected routes so that the nexthop lookup does not fail and so that multicast routing daemons do not need to sidestep and look into SAFI_UNICAST to be aware of connected subnets. * zebra/connected.c: add & delete connected in SAFI_MULTICAST Signed-off-by: G.Balaji <balajig81@gmail.com> [merged add/delete patches] Signed-off-by: David Lamparter <equinox@diac24.net>
Diffstat (limited to 'zebra/connected.c')
-rw-r--r--zebra/connected.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/zebra/connected.c b/zebra/connected.c
index f699b147..05538c5d 100644
--- a/zebra/connected.c
+++ b/zebra/connected.c
@@ -191,6 +191,9 @@ connected_up_ipv4 (struct interface *ifp, struct connected *ifc)
rib_add_ipv4 (ZEBRA_ROUTE_CONNECT, 0, &p, NULL, NULL, ifp->ifindex,
RT_TABLE_MAIN, ifp->metric, 0, SAFI_UNICAST);
+ rib_add_ipv4 (ZEBRA_ROUTE_CONNECT, 0, &p, NULL, NULL, ifp->ifindex,
+ RT_TABLE_MAIN, ifp->metric, 0, SAFI_MULTICAST);
+
rib_update ();
}
@@ -297,6 +300,8 @@ connected_down_ipv4 (struct interface *ifp, struct connected *ifc)
/* Same logic as for connected_up_ipv4(): push the changes into the head. */
rib_delete_ipv4 (ZEBRA_ROUTE_CONNECT, 0, &p, NULL, ifp->ifindex, 0, SAFI_UNICAST);
+ rib_delete_ipv4 (ZEBRA_ROUTE_CONNECT, 0, &p, NULL, ifp->ifindex, 0, SAFI_MULTICAST);
+
rib_update ();
}