summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_fsm.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2023-08-26 23:30:10 +0200
committerDonald Sharp <sharpd@nvidia.com>2023-09-09 22:28:05 +0200
commit3842286ed40d727fa338910139fc40daf9228d50 (patch)
tree62aa5e3f0ab8b6675ee5ed7838e2403d951a71ad /bgpd/bgp_fsm.c
parentbgpd: move t_pmax_restart to peer_connection (diff)
downloadfrr-3842286ed40d727fa338910139fc40daf9228d50.tar.xz
frr-3842286ed40d727fa338910139fc40daf9228d50.zip
bgpd: bgp_notify_send use peer_connection instead of peer
The bgp_notify_send function should use a peer_connection Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'bgpd/bgp_fsm.c')
-rw-r--r--bgpd/bgp_fsm.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/bgpd/bgp_fsm.c b/bgpd/bgp_fsm.c
index 96a46f5f5..781c8aa1e 100644
--- a/bgpd/bgp_fsm.c
+++ b/bgpd/bgp_fsm.c
@@ -1632,7 +1632,7 @@ static enum bgp_fsm_state_progress
bgp_stop_with_notify(struct peer *peer, uint8_t code, uint8_t sub_code)
{
/* Send notify to remote peer */
- bgp_notify_send(peer, code, sub_code);
+ bgp_notify_send(peer->connection, code, sub_code);
if (peer_dynamic_neighbor_no_nsf(peer)) {
if (bgp_debug_neighbor_events(peer))
@@ -1727,7 +1727,7 @@ bgp_connect_success(struct peer_connection *connection)
flog_err_sys(EC_LIB_SOCKET,
"%s: bgp_getsockname(): failed for peer %s, fd %d",
__func__, peer->host, connection->fd);
- bgp_notify_send(peer, BGP_NOTIFY_FSM_ERR,
+ bgp_notify_send(peer->connection, BGP_NOTIFY_FSM_ERR,
bgp_fsm_error_subcode(connection->status));
bgp_writes_on(connection);
return BGP_FSM_FAILURE;
@@ -1773,7 +1773,7 @@ bgp_connect_success_w_delayopen(struct peer_connection *connection)
flog_err_sys(EC_LIB_SOCKET,
"%s: bgp_getsockname(): failed for peer %s, fd %d",
__func__, peer->host, connection->fd);
- bgp_notify_send(peer, BGP_NOTIFY_FSM_ERR,
+ bgp_notify_send(peer->connection, BGP_NOTIFY_FSM_ERR,
bgp_fsm_error_subcode(connection->status));
bgp_writes_on(connection);
return BGP_FSM_FAILURE;
@@ -2348,7 +2348,8 @@ bgp_establish(struct peer_connection *connection)
peer->host);
if (peer->doppelganger->connection->status > Active)
- bgp_notify_send(peer->doppelganger, BGP_NOTIFY_CEASE,
+ bgp_notify_send(peer->doppelganger->connection,
+ BGP_NOTIFY_CEASE,
BGP_NOTIFY_CEASE_COLLISION_RESOLUTION);
else
peer_delete(peer->doppelganger);