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>
diff --git a/zebra/connected.c b/zebra/connected.c
index f699b14..05538c5 100644
--- a/zebra/connected.c
+++ b/zebra/connected.c
@@ -191,6 +191,9 @@
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 @@
/* 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 ();
}