On 10/11/2016 7:04 AM, Paul Jakma wrote: > I don't understand the subject. This isn't restoring anything, but > adding a missing check from the patch to make NHT work without zebra? Or > did I somehow drop that chunk from the original patch? Yes, I patched a different spot - that is the one that is used in my test cases. Your change (under my change log) seems legitimate too, but as far as I can tell it's in a function that is never called.
> Also, what about the tests on NEXTHOP_VALID in evaluate_paths? Do they > need to take bgp_zebra_num_connects into account? Fair point. I'm not sure - but I think you are right. > At which point, better > to do this valid check via a helper? WFM. Lou > regards, > > Paul > > On Mon, 10 Oct 2016, Lou Berger wrote: > >> --- >> bgpd/bgp_nht.c | 3 ++- >> 1 file changed, 2 insertions(+), 1 deletion(-) >> >> diff --git a/bgpd/bgp_nht.c b/bgpd/bgp_nht.c >> index b5d830e..7808505 100644 >> --- a/bgpd/bgp_nht.c >> +++ b/bgpd/bgp_nht.c >> @@ -194,7 +194,8 @@ bgp_find_or_add_nexthop (afi_t afi, struct bgp_info *ri, >> struct peer *peer, >> else if (peer) >> bnc->nht_info = (void *)peer; /* NHT peer reference */ >> >> - return (CHECK_FLAG(bnc->flags, BGP_NEXTHOP_VALID)); >> + return (bgp_zebra_num_connects() == 0 || >> + CHECK_FLAG(bnc->flags, BGP_NEXTHOP_VALID)); >> } >> >> void >> _______________________________________________ Quagga-dev mailing list Quagga-dev@lists.quagga.net https://lists.quagga.net/mailman/listinfo/quagga-dev