From: vivek Date: Mon, 21 Sep 2015 04:20:29 +0000 (-0700) Subject: Zebra: Fix static NHT for multiple routes scenario X-Git-Tag: frr-2.0-rc1~1250 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=796c789cd06553c0478155389e026413ab69f5dd;p=matthieu%2Ffrr.git Zebra: Fix static NHT for multiple routes scenario Ticket: CM-7482 Reviewed By: CCR-3518 Testing Done: Manual verification (on 2.5-br) When a static route has a nexthop change but the route is also learnt through another protocol, ensure that the nexthop tracking code marks the correct route entry (RIB) for processing. This is a port of patch zebra-static-nht-fixes2.patch from 2.5-br. Signed-off-by: Vivek Venkatraman Reviewed-by: Donald Sharp Reviewed-by: Dinesh Dutt --- diff --git a/zebra/zebra_rnh.c b/zebra/zebra_rnh.c index 73a81b1360..eea7759589 100644 --- a/zebra/zebra_rnh.c +++ b/zebra/zebra_rnh.c @@ -476,7 +476,8 @@ zebra_evaluate_rnh (int vrfid, int family, int force, rnh_type_t type, { RNODE_FOREACH_RIB(static_rn, srib) { - break; /* pick the first and only(?) rib for static */ + if (srib->type == ZEBRA_ROUTE_STATIC) + break; /* currently works for only 1 static route. */ } if (!srib)