mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-05-11 19:31:05 +00:00
BGP: Fix BGP unnumbered peerings across VRFs
Upon receipt of incoming connection, a peer structure (doppelganger) is created internally and the connection processed for it. The problem is that in the case of BGP unnumbered, the sockunion structure within BGP was being updated (in peer_create()) prior to the peer's flags being updated, so it didn't take into account the 'v6only' configuration. This results in subsequent problems when bgp_bind() is done - the socket ends up being bound to the BGP instance instead of the interface. In the case of an incoming connection, we should just use the addresses on which the connection was setup/accepted, there is no need to attempt to derive it again. Further, there is no need to attempt to update addresses at the time of peer_create() since that is done when the connection is attempted in bgp_start(). Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com> Reviewed-by: Don Slice <dslice@cumulusnetworks.com> Ticket: CM-10028 Reviewed By: CCR-4373 Testing Done: Manual, bgpsmoke
This commit is contained in:
parent
cbe0a6a1e9
commit
83260f0093
@ -409,6 +409,7 @@ bgp_accept (struct thread *thread)
|
||||
|
||||
peer = peer_create (&su, peer1->conf_if, peer1->bgp, peer1->local_as,
|
||||
peer1->as, peer1->as_type, 0, 0);
|
||||
peer->su = su;
|
||||
|
||||
peer_xfer_config(peer, peer1);
|
||||
UNSET_FLAG (peer->flags, PEER_FLAG_CONFIG_NODE);
|
||||
|
@ -1389,7 +1389,6 @@ peer_create (union sockunion *su, const char *conf_if, struct bgp *bgp,
|
||||
if (conf_if)
|
||||
{
|
||||
peer->conf_if = XSTRDUP (MTYPE_PEER_CONF_IF, conf_if);
|
||||
bgp_peer_conf_if_to_su_update(peer);
|
||||
if (peer->host)
|
||||
XFREE(MTYPE_BGP_PEER_HOST, peer->host);
|
||||
peer->host = XSTRDUP (MTYPE_BGP_PEER_HOST, conf_if);
|
||||
|
Loading…
Reference in New Issue
Block a user