]> git.puffer.fish Git - mirror/frr.git/commit
bgpd: track correct originator-id in reflected routes
authorPradosh Mohapatra <pmohapat@cumulusnetworks.com>
Sat, 7 Sep 2013 07:13:37 +0000 (07:13 +0000)
committerDavid Lamparter <equinox@opensourcerouting.org>
Thu, 15 May 2014 17:15:45 +0000 (19:15 +0200)
commit689bb66c6a92d238bed1a8b0920438c5a2271966
tree4cf3ee1be6acdb4cf3b85d3da83e09cb64d29ba9
parent2fdd455cfd1f758b7aa2e6c8e3d185098b93908c
bgpd: track 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>
[DL: whitespace changes dropped]
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
bgpd/bgp_attr.c
bgpd/bgp_route.c