mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-07-29 19:37:26 +00:00
bgpd: Modify bgp_connect_in_progress_update_connection to use connection
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
This commit is contained in:
parent
2771431938
commit
72f716ef28
@ -1807,12 +1807,14 @@ bgp_connect_fail(struct peer_connection *connection)
|
|||||||
/* after connect is called(), getpeername is able to return
|
/* after connect is called(), getpeername is able to return
|
||||||
* port and address on non established streams
|
* port and address on non established streams
|
||||||
*/
|
*/
|
||||||
static void bgp_connect_in_progress_update_connection(struct peer *peer)
|
static void bgp_connect_in_progress_update_connection(struct peer_connection *connection)
|
||||||
{
|
{
|
||||||
bgp_updatesockname(peer, peer->connection);
|
struct peer *peer = connection->peer;
|
||||||
|
|
||||||
|
bgp_updatesockname(peer, connection);
|
||||||
if (!peer->su_remote && !BGP_CONNECTION_SU_UNSPEC(peer->connection)) {
|
if (!peer->su_remote && !BGP_CONNECTION_SU_UNSPEC(peer->connection)) {
|
||||||
/* if connect initiated, then dest port and dest addresses are well known */
|
/* if connect initiated, then dest port and dest addresses are well known */
|
||||||
peer->su_remote = sockunion_dup(&peer->connection->su);
|
peer->su_remote = sockunion_dup(&connection->su);
|
||||||
if (sockunion_family(peer->su_remote) == AF_INET)
|
if (sockunion_family(peer->su_remote) == AF_INET)
|
||||||
peer->su_remote->sin.sin_port = htons(peer->port);
|
peer->su_remote->sin.sin_port = htons(peer->port);
|
||||||
else if (sockunion_family(peer->su_remote) == AF_INET6)
|
else if (sockunion_family(peer->su_remote) == AF_INET6)
|
||||||
@ -1916,7 +1918,7 @@ static enum bgp_fsm_state_progress bgp_start(struct peer_connection *connection)
|
|||||||
__func__, peer->connection->fd);
|
__func__, peer->connection->fd);
|
||||||
return BGP_FSM_FAILURE;
|
return BGP_FSM_FAILURE;
|
||||||
}
|
}
|
||||||
bgp_connect_in_progress_update_connection(peer);
|
bgp_connect_in_progress_update_connection(connection);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* - when the socket becomes ready, poll() will signify POLLOUT
|
* - when the socket becomes ready, poll() will signify POLLOUT
|
||||||
|
Loading…
Reference in New Issue
Block a user