bgp proto bug with add paths in bird 1.6.3

Lennert Buytenhek buytenh at wantstofly.org
Mon Mar 6 18:41:44 CET 2017


Hi!

bgp_init() in proto/bgp/bgp.c does:

  P->accept_ra_types = c->secondary ? RA_ACCEPTED : RA_OPTIMAL;

and then bgp_rx_open() in proto/bgp/packets.c does:

  if (p->add_path_tx)
    p->p.accept_ra_types = RA_ANY;

As bgp_init() seems to only be called at configuration time, this
means that if you have add path tx, and you have a peer that advertises
rx add path and then reconnects without advertising rx add path, you
will still have RA_ANY set on the sending side and not have the correct
behavior of only sending the optimal route.  (This is easy to verify.)

Not entirely sure how you'd want to fix this, but perhaps replicating
the RA_ACCEPTED / RA_OPTIONAL assignment in bgp_rx_open() (or just
moving it there) would do the trick?


Cheers,
Lennert


More information about the Bird-users mailing list