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 /bgpd/bgp_network.c | |
| 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>
Diffstat (limited to 'bgpd/bgp_network.c')
| -rw-r--r-- | bgpd/bgp_network.c | 6 | 
1 files changed, 6 insertions, 0 deletions
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,  | 
