On Fri, 11 Dec 2015 18:58:57 -0500
Donald Sharp <[email protected]> wrote:

> From: Daniel Walton <[email protected]>
> 
> A valid BGP nexthop is flagged as invalid
> 
> Signed-off-by: Daniel Walton <[email protected]>
> ---
>  zebra/zebra_rnh.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/zebra/zebra_rnh.c b/zebra/zebra_rnh.c
> index db1552d..5f68f64 100644
> --- a/zebra/zebra_rnh.c
> +++ b/zebra/zebra_rnh.c
> @@ -639,7 +639,8 @@ send_client (struct rnh *rnh, struct zserv
> *client, vrf_id_t vrf_id) nump = stream_get_endp(s);
>        stream_putc (s, 0);
>        for (nexthop = rib->nexthop; nexthop; nexthop = nexthop->next)
> -     if (CHECK_FLAG (nexthop->flags, NEXTHOP_FLAG_FIB) &&
> +     if ((CHECK_FLAG (nexthop->flags, NEXTHOP_FLAG_FIB) ||
> +             CHECK_FLAG (nexthop->flags, NEXTHOP_FLAG_RECURSIVE)) &&
>           CHECK_FLAG (nexthop->flags, NEXTHOP_FLAG_ACTIVE))
>         {
>           stream_putc (s, nexthop->type);

I had to revert this on my nhrp branch. The rationale I wrote is:
    Problem is BGP thinks the nexthop is accessible when it's
    recursive, and selects it, but zebra rejects it at route install
    time. Causing FIB and BGP state to be out-of-sync. Fix nht to
    follow same rules as zebra rib.

The nexthop tracking validity test really needs to match whatever the
test is in zebra_rib.c: nexthop_active_ipv4(). Ideally this test should
be shared code.

Perhaps ZEBRA_FLAG_INTERNAL needs to be accounted, or if it's using
default route as recursive route.

/Timo


_______________________________________________
Quagga-dev mailing list
[email protected]
https://lists.quagga.net/mailman/listinfo/quagga-dev

Reply via email to