From: G.Balaji Date: Mon, 2 Apr 2012 18:01:29 +0000 (+0530) Subject: zebra: feed Connected routes into MRIB X-Git-Tag: frr-2.0-rc1~1831 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=42cb6b6655d0cc141374ec373220d244f81fbba0;p=mirror%2Ffrr.git 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 [merged add/delete patches] Signed-off-by: David Lamparter --- diff --git a/zebra/connected.c b/zebra/connected.c index f699b147d8..05538c5d49 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 (); }