[quagga-dev 11589] Re: [PATCH 1/2] MBGP routes should not be installed in the kernel

Paul Jakma paul at jakma.org
Mon Oct 20 18:14:08 BST 2014


Hi,

On Mon, 20 Oct 2014, Balaji.G wrote:

> diff --git a/lib/zebra.h b/lib/zebra.h
> index b289a19..bed1327 100644
> --- a/lib/zebra.h
> +++ b/lib/zebra.h
> @@ -476,6 +476,7 @@ extern const char *zserv_command_string (unsigned int command);
> #define ZEBRA_FLAG_SELECTED           0x10
> #define ZEBRA_FLAG_CHANGED            0x20
> #define ZEBRA_FLAG_STATIC             0x40
> +#define ZEBRA_FLAG_MBGP 	      0x60
> #define ZEBRA_FLAG_REJECT             0x80

0x60 isn't going to work. :) Also, we're out of bits in this Zserv visible 
field.

You could use a different route-type perhaps. ZEBRA_ROUTE_MBGP.

Alternatively, is there a general rule to recognise when a multicast 
should not be installed? If BGP + SAFI == multicast never ever should be 
FIB (?), you can check for that?

> /* Zebra nexthop flags. */
> diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c
> index dc7e1ca..fa19021 100644
> --- a/zebra/zebra_rib.c
> +++ b/zebra/zebra_rib.c
> @@ -1290,6 +1290,10 @@ rib_process (struct route_node *rn)
>       if (rib->distance == DISTANCE_INFINITY)
>         continue;
>
> +      /* MBGP routes shouldn't be installed in kernel */
> +      if (rib->flags == ZEBRA_FLAG_MBGP)
> +	continue;
> +
>       /* Newly selected rib, the common case. */
>       if (!select)
>         {
> @@ -1407,7 +1411,7 @@ rib_process (struct route_node *rn)
>    * tell, that if a new winner exists, FIB is still not updated with this
>    * data, but ready to be.
>    */
> -  if (select)
> +  if (select)

What's the change here? :)

regards,
-- 
Paul Jakma	paul at jakma.org	@pjakma	Key ID: 64A2FF6A
Fortune:
Q:	How many WASPs does it take to change a light bulb?
A:	One.




More information about the Quagga-dev mailing list