[quagga-dev 11591] Re: [PATCH 1/2] MBGP routes should not be installed in the kernel
balajig81 at gmail.com
Mon Oct 20 18:22:40 BST 2014
Thanks for your comments.
On Mon, Oct 20, 2014 at 10:44 PM, Paul Jakma <paul at jakma.org> wrote:
> 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
>> #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
> You could use a different route-type perhaps. ZEBRA_ROUTE_MBGP.
I also tried that as an option and what i thought was then we need to
have a separate character to denote MBGP in routing table. Something like
show ip route mbgp in command and we display those routes as "M" or
something like that ? If i add a new Route type ZEBRA_ROUTE_MBGP in
routes_types.txt, the show ip route ? would show the new thing as well.
Would that be ok ?
> 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?
The reason why i cannot check for that is because we add the routes in RIB
and then when the workqueue kicks in, it goes through the nodes and calls
rib_process() which pushes the entries down to the kernel. At this level we
wouldn't have the information whether its SAFI_Multicast or not. I didnt
want to break the existing interface so i made this change.
> /* 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)
>> + /* 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? :)
Sorry no change there. I can respin the patch based on your comments
and next time the above change wouldn't be there ;)
> Paul Jakma paul at jakma.org @pjakma Key ID: 64A2FF6A
> Q: How many WASPs does it take to change a light bulb?
> A: One.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Quagga-dev