NetBSD Problem Report #60325

From www@netbsd.org  Fri Jun 12 16:50:38 2026
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256
	 client-signature RSA-PSS (2048 bits) client-digest SHA256)
	(Client CN "mail.netbsd.org", Issuer "R13" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 464651A923A
	for <gnats-bugs@gnats.NetBSD.org>; Fri, 12 Jun 2026 16:50:38 +0000 (UTC)
Message-Id: <20260612165037.698761A923B@mollari.NetBSD.org>
Date: Fri, 12 Jun 2026 16:50:37 +0000 (UTC)
From: roy@marples.name
Reply-To: roy@marples.name
To: gnats-bugs@NetBSD.org
Subject: unbound emits warning: so-sndbuf 4194304 was not granted
X-Send-Pr-Version: www-1.0
X-From4GNATS: "roy@marples.name via gnats" <gnats-admin@NetBSD.org>

>Number:         60325
>Category:       bin
>Synopsis:       unbound emits warning: so-sndbuf 4194304 was not granted
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jun 12 16:55:01 +0000 2026
>Last-Modified:  Fri Jul 03 18:00:01 +0000 2026
>Originator:     Roy Marples
>Release:        NetBSD-11.99.6
>Organization:
>Environment:
>Description:
warning: so-sndbuf 4194304 was not granted. Got 9216. To fix: s
tart with root permissions(linux) or sysctl bigger net.core.wmem_max(linux) or kern.ipc.maxs
ockbuf(bsd) values. or set so-sndbuf: 0 (use system value).

None of the sysctls mentioned exist on NetBSD and I don't see an obvious one via sysctl -a
>How-To-Repeat:
Start unbound with a default config
>Fix:
server:
     so-sndbuf: 0


>Audit-Trail:
From: Robert Elz <kre@munnari.OZ.AU>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: bin/60325: unbound emits warning: so-sndbuf 4194304 was not granted
Date: Sat, 13 Jun 2026 02:40:55 +0700

     Date:        Fri, 12 Jun 2026 16:55:01 +0000 (UTC)
     From:        "roy@marples.name via gnats" <gnats-admin@NetBSD.org>
     Message-ID:  <20260612165501.3E2271A923C@mollari.NetBSD.org>

   | None of the sysctls mentioned exist on NetBSD and I don't see an
   | obvious one via sysctl -a

 The 9216 max suggests that the one you're looking for is
 net.inet.udp.sendspace or net.inet6.udp6.sendspace (or both).

 kre

From: mlelstv@serpens.de (Michael van Elst)
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: bin/60325: unbound emits warning: so-sndbuf 4194304 was not granted
Date: Fri, 12 Jun 2026 19:48:48 -0000 (UTC)

 gnats-admin@NetBSD.org ("roy@marples.name via gnats") writes:

 >warning: so-sndbuf 4194304 was not granted. Got 9216. To fix: s
 >tart with root permissions(linux) or sysctl bigger net.core.wmem_max(linux) or kern.ipc.maxs
 >ockbuf(bsd) values. or set so-sndbuf: 0 (use system value).


 No idea why unbound even tries to set the sndbuf.

 There is no direct equivalent of net.core.wmem_max, but the value that
 it "got" and probably wants to override is net.inet.udp.sendspace.

 That however is

 /* 
  * For send - really max datagram size; for receive - 40 1K datagrams.
  */     
 static int udp_sendspace = 9216;
 static int udp_recvspace = 40 * (1024 + sizeof(struct sockaddr_in));


 A program should not assume that there is a deep write buffer for UDP.


From: "Taylor R Campbell" <riastradh@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/60325 CVS commit: src
Date: Wed, 1 Jul 2026 03:56:28 +0000

 Module Name:	src
 Committed By:	riastradh
 Date:		Wed Jul  1 03:56:28 UTC 2026

 Modified Files:
 	src/distrib/sets/lists/etc: mi
 	src/etc: Makefile
 	src/etc/defaults: rc.conf
 	src/external/bsd/unbound/etc/rc.d: unbound
 	src/share/man/man5: rc.conf.5
 	src/share/man/man8: afterboot.8
 Added Files:
 	src/etc/unbound: Makefile unbound.conf

 Log Message:
 unbound: Install a default configuration.

 This way, setting unbound=YES is enough to get a working local
 recursive resolver listening on 127.0.0.1:53 and [::1]:53.

 PR misc/60339: unbound=YES in rc.conf should be enough to get a
 recursive resolver

 Additionally, this includes the workaround for:

 PR bin/60325: unbound emits warning: so-sndbuf 4194304 was not
 granted


 To generate a diff of this commit:
 cvs rdiff -u -r1.277 -r1.278 src/distrib/sets/lists/etc/mi
 cvs rdiff -u -r1.476 -r1.477 src/etc/Makefile
 cvs rdiff -u -r1.167 -r1.168 src/etc/defaults/rc.conf
 cvs rdiff -u -r0 -r1.1 src/etc/unbound/Makefile src/etc/unbound/unbound.conf
 cvs rdiff -u -r1.2 -r1.3 src/external/bsd/unbound/etc/rc.d/unbound
 cvs rdiff -u -r1.194 -r1.195 src/share/man/man5/rc.conf.5
 cvs rdiff -u -r1.83 -r1.84 src/share/man/man8/afterboot.8

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/60325 CVS commit: [netbsd-11] src
Date: Fri, 3 Jul 2026 17:58:23 +0000

 Module Name:	src
 Committed By:	martin
 Date:		Fri Jul  3 17:58:23 UTC 2026

 Modified Files:
 	src/distrib/sets/lists/etc [netbsd-11]: mi
 	src/etc [netbsd-11]: Makefile
 	src/etc/defaults [netbsd-11]: rc.conf
 	src/external/bsd/unbound/etc/rc.d [netbsd-11]: unbound
 	src/share/man/man5 [netbsd-11]: rc.conf.5
 	src/share/man/man8 [netbsd-11]: afterboot.8
 Added Files:
 	src/etc/unbound [netbsd-11]: Makefile unbound.conf

 Log Message:
 Pull up following revision(s) (requested by riastradh in ticket #360):

 	share/man/man8/afterboot.8: revision 1.84
 	etc/unbound/unbound.conf: revision 1.1
 	share/man/man5/rc.conf.5: revision 1.195
 	distrib/sets/lists/etc/mi: revision 1.278
 	etc/defaults/rc.conf: revision 1.168
 	etc/unbound/Makefile: revision 1.1
 	external/bsd/unbound/etc/rc.d/unbound: revision 1.3
 	etc/Makefile: revision 1.477

 unbound: Install a default configuration.

 This way, setting unbound=YES is enough to get a working local
 recursive resolver listening on 127.0.0.1:53 and [::1]:53.

 PR misc/60339: unbound=YES in rc.conf should be enough to get a
 recursive resolver

 Additionally, this includes the workaround for:
 PR bin/60325: unbound emits warning: so-sndbuf 4194304 was not
 granted


 To generate a diff of this commit:
 cvs rdiff -u -r1.276 -r1.276.2.1 src/distrib/sets/lists/etc/mi
 cvs rdiff -u -r1.475 -r1.475.2.1 src/etc/Makefile
 cvs rdiff -u -r1.167 -r1.167.4.1 src/etc/defaults/rc.conf
 cvs rdiff -u -r0 -r1.1.2.2 src/etc/unbound/Makefile \
     src/etc/unbound/unbound.conf
 cvs rdiff -u -r1.2 -r1.2.18.1 src/external/bsd/unbound/etc/rc.d/unbound
 cvs rdiff -u -r1.194 -r1.194.2.1 src/share/man/man5/rc.conf.5
 cvs rdiff -u -r1.83 -r1.83.4.1 src/share/man/man8/afterboot.8

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.