From: Renato Westphal Date: Fri, 1 Sep 2017 14:44:22 +0000 (-0300) Subject: zebra: add an exception for link-local connected routes X-Git-Tag: frr-4.0-dev~347^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=5f20552d51647a7ab672b9e7dbdf7de757c9fb29;p=mirror%2Ffrr.git zebra: add an exception for link-local connected routes Link-local routes are unique in the sense that they all have the same prefix but have different nexthops (local interfaces). Add an exception in rib_add() to allows us to keep track of all of them. Signed-off-by: Renato Westphal --- diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c index 59b693435d..deb434bd35 100644 --- a/zebra/zebra_rib.c +++ b/zebra/zebra_rib.c @@ -2472,7 +2472,12 @@ int rib_add(afi_t afi, safi_t safi, vrf_id_t vrf_id, int type, u_short instance, rtnh = re->nexthop; if (nexthop_same_no_recurse(rtnh, nh)) return 0; - else + /* + * Nexthop is different. Remove the old route unless it's + * a link-local route. + */ + else if (afi != AFI_IP6 + || !IN6_IS_ADDR_LINKLOCAL(&p->u.prefix6)) same = re; }