[prev in list] [next in list] [prev in thread] [next in thread] 

List:       quagga-dev
Subject:    [quagga-dev 11277] Re: [PATCH] bgpd: bgpd-cmp-originator-id-in-attr-hash.patch
From:       David Lamparter <equinox () opensourcerouting ! org>
Date:       2014-05-15 18:10:48
Message-ID: 20140515181048.GC602738 () jupiter ! n2 ! diac24 ! net
[Download RAW message or body]

On Sat, Sep 07, 2013 at 01:13:37AM -0700, Pradosh Mohapatra wrote:
> BGP: Advertise the correct originator-id in reflected routes
> 
> ISSUE:
> 
> Suppose route1 and route2 received from route-reflector-client1 and client2
> respectively have identical attributes. The current logic of creating the
> adj-rib-out for a peer threads the 'adv' structures for both routes against
> the same attribute. This results in 'bgp_update_packet()' to pack those
> routes in the same UPDATE message with one attr structure formatted. The
> originator-id is thus set according to the first route's received router id.
> This is incorrect.
> 
> PATCH:
> 
> Fix bgp_announce_check() function to set the originator-id in the
> advertising attr structure. Also, fix the attribute hash function and
> compare function to consider originator-id. Otherwise attributes where all
> fields except the originator-id are identical get merged into one memory
> location.
> 
> Signed-off-by: Pradosh Mohapatra <pmohapat at cumulusnetworks.com>
> Reviewed-by: Scott Feldman <sfeldma at cumulusnetworks.com>
> Reviewed-by: Ken Yin <kyin at cumulusnetworks.com>

Applied, thanks!

I've removed the following 2 whitespace-only chunks:
(Whitespace should only be improved in/near lines that are changed
anyway, not completely independent.)

> @@ -421,7 +422,7 @@ attrhash_cmp (const void *p1, const void *p2)
>      {
>        const struct attr_extra *ae1 = attr1->extra;
>        const struct attr_extra *ae2 = attr2->extra;
> -      
> +
>        if (ae1 && ae2
>            && ae1->aggregator_as == ae2->aggregator_as
>            && ae1->aggregator_addr.s_addr == ae2->aggregator_addr.s_addr
> @@ -811,7 +811,7 @@ bgp_announce_check (struct bgp_info *ri, struct peer *peer, struct prefix *p,
>    filter = &peer->filter[afi][safi];
>    bgp = peer->bgp;
>    riattr = bgp_info_mpath_count (ri) ? bgp_info_mpath_attr (ri) : ri->attr;
> -  
> +
>    if (DISABLE_BGP_ANNOUNCE)
>      return 0;

_______________________________________________
Quagga-dev mailing list
Quagga-dev@lists.quagga.net
https://lists.quagga.net/mailman/listinfo/quagga-dev
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic