On Tue, Oct 7, 2025 at 8:00 PM Cy Schubert <[email protected]> wrote:
>
> In message <[email protected]>, Cy Schubert writes:
> > In message <[email protected]
> > om>
> > , Jose Luis Duran writes:
> > > Hello Cy,
> > >
> > > According to the changelog:
> > >
> > > "The default value increase for so-sndbuf is to mitigate a cross-layer
> > > issue where the UDP socket send buffers are exhausted waiting for
> > > ARP/NDP resolution. Thanks to Reflyable for the report.
> > >
> > > To help the server start more easily, the setsockopt for sndbuf buffer
> > > size prints a warning instead of a failure to start the server if it
> > > can not set the buffer size."
> > >
> > > This means so-sndbuf is now 4m. Which triggers a warning, detailed in
> > > upstream commit 713b5db5 ("- Fix to print warning for when so-sndbuf
> > > setsockopt is not granted.").
> > >
> > > I wonder if we should revert back to using "so-sndbuf: 0" as the
> > > default for FreeBSD? Or is there a better solution/workaround?
> >
> > There are in fact two commits.
> >
> > 1ef7b4a24 adjusted so-sndbuf to default to 4m.
> >
> > 03772d10f changed the default from to 1m.
> >
> > I assume you're suggesting reverting both upstream commits for FreeBSD?
>
> Looking at the commit that started unbound down this path we see this in
> their commit log before bumping the default to 4m:
>
>
> - Change default for so-sndbuf to 1m, to mitigate a cross-layer
> issue where the UDP socket send buffers are exhausted waiting
> for ARP/NDP resolution. Thanks to Reflyable for the report.
>
> I use local_unbound on one of my machines here. It has 8 GB RAM. I don't
> see any warning messages WRT the socket option not accepted. The first
> question that comes to mind, to try to understand your environment, how
> much RAM does this machine have and of that how much is allocated to the
> kernel?
Here is the warning on a fresh VM with 8GB:
# sysctl hw.physmem
hw.physmem: 8551202816
# service local_unbound onestart
Starting local_unbound.
[1759883902] local-unbound[3237:0] warning: setsockopt(...,
SO_SNDBUF, ...) was not granted: No buffer space available
[1759883902] local-unbound[3237:0] warning: so-sndbuf 4194304 was
not granted. Got 9216. To fix: start with root permissions(linux) or
sysctl bigger net.core.wmem_max(linux) or kern.ipc.maxsockbuf(bsd)
values. or set so-sndbuf: 0 (use system value).
[1759883902] local-unbound[3237:0] warning: setsockopt(...,
SO_SNDBUF, ...) was not granted: No buffer space available
[1759883902] local-unbound[3237:0] warning: so-sndbuf 4194304 was
not granted. Got 9216. To fix: start with root permissions(linux) or
sysctl bigger net.core.wmem_max(linux) or kern.ipc.maxsockbuf(bsd)
values. or set so-sndbuf: 0 (use system value).
Waiting for nameserver to start... good
If we configure it with "so-sndbuf: 0" the warning goes away.
But, nevermind if I'm the only one seeing these warnings. It was just
a basic local_unbound test.
Regards,
>
> --
> Cheers,
> Cy Schubert <[email protected]>
> FreeBSD UNIX: <[email protected]> Web: https://FreeBSD.org
> NTP: <[email protected]> Web: https://nwtime.org
>
> e**(i*pi)+1=0
>
>