mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-07-09 20:01:10 +00:00
bgpd: Do not show TCP MSS if the socket is broken
Just avoid calling for TCP MSS socket option if it's not in use.
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
(cherry picked from commit 65497556ed
)
This commit is contained in:
parent
da5aeee0d6
commit
0c679ffcbe
@ -673,6 +673,9 @@ int sockopt_tcp_mss_get(int sock)
|
|||||||
int tcp_maxseg = 0;
|
int tcp_maxseg = 0;
|
||||||
socklen_t tcp_maxseg_len = sizeof(tcp_maxseg);
|
socklen_t tcp_maxseg_len = sizeof(tcp_maxseg);
|
||||||
|
|
||||||
|
if (sock < 0)
|
||||||
|
return 0;
|
||||||
|
|
||||||
ret = getsockopt(sock, IPPROTO_TCP, TCP_MAXSEG, &tcp_maxseg,
|
ret = getsockopt(sock, IPPROTO_TCP, TCP_MAXSEG, &tcp_maxseg,
|
||||||
&tcp_maxseg_len);
|
&tcp_maxseg_len);
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user