diff options
| author | Donald Sharp <sharpd@nvidia.com> | 2023-09-08 12:02:05 -0400 | 
|---|---|---|
| committer | Donald Sharp <sharpd@nvidia.com> | 2023-09-10 08:31:25 -0400 | 
| commit | 0c3a70c64430448c43fe12bf0ac044488352697c (patch) | |
| tree | a7fd805ffc7837e50380258b639f0a921b5d79e2 /bgpd/bgp_fsm.c | |
| parent | c50a82c39b20354171a0cf43ab2f99f64389e225 (diff) | |
bgpd: Move the peer->su to connection->su
The sockunion is per connection.  So let's move it over.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'bgpd/bgp_fsm.c')
| -rw-r--r-- | bgpd/bgp_fsm.c | 14 | 
1 files changed, 8 insertions, 6 deletions
diff --git a/bgpd/bgp_fsm.c b/bgpd/bgp_fsm.c index ccebe6b79a..d4b1df175f 100644 --- a/bgpd/bgp_fsm.c +++ b/bgpd/bgp_fsm.c @@ -93,9 +93,11 @@ int bgp_peer_reg_with_nht(struct peer *peer)  	    && !CHECK_FLAG(peer->bgp->flags, BGP_FLAG_DISABLE_NH_CONNECTED_CHK))  		connected = 1; -	return bgp_find_or_add_nexthop( -		peer->bgp, peer->bgp, family2afi(peer->su.sa.sa_family), -		SAFI_UNICAST, NULL, peer, connected, NULL); +	return bgp_find_or_add_nexthop(peer->bgp, peer->bgp, +				       family2afi( +					       peer->connection->su.sa.sa_family), +				       SAFI_UNICAST, NULL, peer, connected, +				       NULL);  }  static void peer_xfer_stats(struct peer *peer_dst, struct peer *peer_src) @@ -1551,7 +1553,7 @@ enum bgp_fsm_state_progress bgp_stop(struct peer_connection *connection)  		peer_delete(peer);  		ret = BGP_FSM_FAILURE_AND_DELETE;  	} else { -		bgp_peer_conf_if_to_su_update(peer); +		bgp_peer_conf_if_to_su_update(connection);  	}  	return ret;  } @@ -1797,9 +1799,9 @@ static enum bgp_fsm_state_progress bgp_start(struct peer_connection *connection)  	struct peer *peer = connection->peer;  	int status; -	bgp_peer_conf_if_to_su_update(peer); +	bgp_peer_conf_if_to_su_update(connection); -	if (peer->su.sa.sa_family == AF_UNSPEC) { +	if (connection->su.sa.sa_family == AF_UNSPEC) {  		if (bgp_debug_neighbor_events(peer))  			zlog_debug(  				"%s [FSM] Unable to get neighbor's IP address, waiting...",  | 
