diff options
| author | Donatas Abraitis <donatas@opensourcerouting.org> | 2023-09-15 14:05:41 +0300 |
|---|---|---|
| committer | Donatas Abraitis <donatas@opensourcerouting.org> | 2023-09-18 15:42:06 +0300 |
| commit | 232470f3b7361b63d99f95796814ae81e1db34ab (patch) | |
| tree | 0bf7f5af5ecbf12f54d403bf0c639558e5e1a80d | |
| parent | 41fa35a8f4156b541c4b6d962e637b6f7f2a17cf (diff) | |
bgpd: Set TCP MSS for the socket even if the session is set to passive
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
| -rw-r--r-- | bgpd/bgp_fsm.c | 6 | ||||
| -rw-r--r-- | bgpd/bgp_network.c | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/bgpd/bgp_fsm.c b/bgpd/bgp_fsm.c index a84ddae018..eef3b64408 100644 --- a/bgpd/bgp_fsm.c +++ b/bgpd/bgp_fsm.c @@ -1832,12 +1832,6 @@ static enum bgp_fsm_state_progress bgp_start(struct peer_connection *connection) /* Clear peer capability flag. */ peer->cap = 0; - /* If the peer is passive mode, force to move to Active mode. */ - if (CHECK_FLAG(peer->flags, PEER_FLAG_PASSIVE)) { - BGP_EVENT_ADD(connection, TCP_connection_open_failed); - return BGP_FSM_SUCCESS; - } - if (peer->bgp->vrf_id == VRF_UNKNOWN) { if (bgp_debug_neighbor_events(peer)) flog_err( diff --git a/bgpd/bgp_network.c b/bgpd/bgp_network.c index 3e252a06f5..3bfdeb1771 100644 --- a/bgpd/bgp_network.c +++ b/bgpd/bgp_network.c @@ -782,6 +782,12 @@ int bgp_connect(struct peer_connection *connection) return connect_error; } + /* If the peer is passive mode, force to move to Active mode. */ + if (CHECK_FLAG(peer->flags, PEER_FLAG_PASSIVE)) { + BGP_EVENT_ADD(connection, TCP_connection_open_failed); + return BGP_FSM_SUCCESS; + } + if (peer->conf_if || peer->ifname) ifindex = ifname2ifindex(peer->conf_if ? peer->conf_if : peer->ifname, |
