]> git.puffer.fish Git - matthieu/frr.git/commit
BGP: Handle interface or local address failure
authorvivek <vivek@cumulusnetworks.com>
Sat, 29 Aug 2015 18:40:32 +0000 (11:40 -0700)
committervivek <vivek@cumulusnetworks.com>
Sat, 29 Aug 2015 18:40:32 +0000 (11:40 -0700)
commite33a4880485735d373cda2c7d7f35ab20bc8839a
tree4d39e16434da95e76772c624bc681b58c4a49706
parentc8a96aef3e1fb2025f3fb0f37cc4a0a75b72a0e7
BGP: Handle interface or local address failure

Ticket: CM-6883
Reviewed By: CCR-3272
Testing Done: Tested on 2.5.3-SE-1

This commit is a port of the patch bgpd-handle-peer-local-address-failure.patch
from 2.5-br.

When a peering is being established, the IPv4 and IPv6 addresses of the
local end of the connection, as applicable, are obtained and stored in
the peer's 'nexthop' structure to facilitate filling of the NEXT_HOP
field in Update messages among other things. The process of obtaining the
local address involves examination of the list of interfaces to identify
a match corresponding to the socket address of the connection.

There are timing conditions, especially when BGPD starts with a config,
where the interface may not have reached BGP from Zebra at the time a
peering reaches the state to determine the local addresses. The code does
not handle this well and the result could be Updates generated with bad
(Martian) NEXT_HOP values. Resolve the issue by bringing down the connection
in this case as not identifying the local addresses is really an error.
bgpd/bgp_network.c
bgpd/bgp_packet.c
bgpd/bgp_zebra.c