[quagga-dev 8906] Re: [PATCH] Zebra rib/fib to be in sinc with kernel routing table

Joakim Tjernlund joakim.tjernlund at transmode.se
Thu Oct 20 15:37:29 BST 2011


Just some minor remarks below:
>
> From: Igor Maravic <igorm at etf.rs>
>
> Enable Zebra rib/fib to be in sinc with kernel routing table. That means
                                sinc -> sync

> when interface goes down, all routes that are directly connected to it are
> deleted from Zebra's rib/fib just like they are delete from kernel
> routing table.
>
> Signed-off-by: Igor Maravic <igorm at etf.rs>
> ---
> :100644 100644 12f3fa5... 8fcefa4... M   zebra/zebra_rib.c
>  zebra/zebra_rib.c |    7 ++++++-
>  1 files changed, 6 insertions(+), 1 deletions(-)
>
> diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c
> index 12f3fa5..8fcefa4 100644
> --- a/zebra/zebra_rib.c
> +++ b/zebra/zebra_rib.c
> @@ -758,6 +758,9 @@ rib_match_ipv6 (struct in6_addr *addr)
>  #define RIB_SYSTEM_ROUTE(R) \
>          ((R)->type == ZEBRA_ROUTE_KERNEL || (R)->type == ZEBRA_ROUTE_CONNECT)
>
> +#define RIB_KERNEL_ROUTE(R) \
> +      ((R)->type == ZEBRA_ROUTE_KERNEL)
> +
>  /* This function verifies reachability of one given nexthop, which can be
>   * numbered or unnumbered, IPv4 or IPv6. The result is unconditionally stored
>   * in nexthop->flags field. If the 4th parameter, 'set', is non-zero,
> @@ -1127,7 +1130,9 @@ rib_process (struct route_node *rn)
>            buf, rn->p.prefixlen, fib);
>        redistribute_delete (&rn->p, fib);
>        if (! RIB_SYSTEM_ROUTE (fib))
> -   rib_uninstall_kernel (rn, fib);
> +         rib_uninstall_kernel (rn, fib);

Is the above line really misindented or did you just happen to touch it?


> +      else if(RIB_KERNEL_ROUTE (fib))
> +         del=fib;
>        UNSET_FLAG (fib->flags, ZEBRA_FLAG_SELECTED);
>
>        /* Set real nexthop. */
> --
> 1.7.4.1
>
> _______________________________________________
> Quagga-dev mailing list
> Quagga-dev at lists.quagga.net
> http://lists.quagga.net/mailman/listinfo/quagga-dev




More information about the Quagga-dev mailing list