Merge pull request #15330 from FRRouting/mergify/bp/stable/9.1/pr-15325

bgpd: Do not show TCP MSS if the socket is broken (backport #15325)
This commit is contained in:
Donatas Abraitis 2024-02-08 21:53:29 +02:00 committed by GitHub
commit 44e0f76fb7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -673,6 +673,9 @@ int sockopt_tcp_mss_get(int sock)
int tcp_maxseg = 0;
socklen_t tcp_maxseg_len = sizeof(tcp_maxseg);
if (sock < 0)
return 0;
ret = getsockopt(sock, IPPROTO_TCP, TCP_MAXSEG, &tcp_maxseg,
&tcp_maxseg_len);
if (ret != 0) {