Skip to content

Commit

Permalink
Merge pull request #15330 from FRRouting/mergify/bp/stable/9.1/pr-15325
Browse files Browse the repository at this point in the history
bgpd: Do not show TCP MSS if the socket is broken (backport #15325)
  • Loading branch information
ton31337 authored Feb 8, 2024
2 parents da5aeee + 0c679ff commit 44e0f76
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/sockopt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 44e0f76

Please sign in to comment.