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>
This commit is contained in:
G.Balaji 2012-04-02 23:31:29 +05:30 committed by David Lamparter
parent a4c06dec1e
commit 42cb6b6655

View File

@ -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 ();
}