Commit 8fbf19312f for frr
commit 8fbf19312f6c379af4ad27e504a39744ac44f898
Author: Donald Sharp <sharpd@nvidia.com>
Date: Sun Sep 27 08:26:09 2026 -0400
lib: Remove unnecessary errors
Setting the receive and send buffers on Freebsd
never gives the amount of space requested. This
warning is repeated for every socket that this happens
to, which is a whole bunch. There is nothing an
operator can do here. So let's remove it.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
diff --git a/lib/sockopt.c b/lib/sockopt.c
index d732d611cb..3eda386163 100644
--- a/lib/sockopt.c
+++ b/lib/sockopt.c
@@ -25,8 +25,6 @@
int setsockopt_so_recvbuf(int sock, int size)
{
- int orig_req = size;
-
while (setsockopt(sock, SOL_SOCKET, SO_RCVBUF, &size, sizeof(size)) ==
-1) {
if (size == 0)
@@ -34,18 +32,11 @@ int setsockopt_so_recvbuf(int sock, int size)
size /= 2;
}
- if (size != orig_req)
- flog_err(EC_LIB_SOCKET,
- "%s: fd %d: SO_RCVBUF set to %d (requested %d)",
- __func__, sock, size, orig_req);
-
return size;
}
int setsockopt_so_sendbuf(const int sock, int size)
{
- int orig_req = size;
-
while (setsockopt(sock, SOL_SOCKET, SO_SNDBUF, &size, sizeof(size)) ==
-1) {
if (size == 0)
@@ -53,11 +44,6 @@ int setsockopt_so_sendbuf(const int sock, int size)
size /= 2;
}
- if (size != orig_req)
- flog_err(EC_LIB_SOCKET,
- "%s: fd %d: SO_SNDBUF set to %d (requested %d)",
- __func__, sock, size, orig_req);
-
return size;
}