Date: Fri, 26 Jun 2026 18:33:18 +0000 From: Shawn Webb <shawn.webb@hardenedbsd.org> To: Dag-Erling =?utf-8?B?U23DuHJncmF2?= <des@FreeBSD.org> Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: f0a861efbafe - main - local-unbound-setup: Support IPv6-only systems Message-ID: <lw6bx5ijns2rqkr7i3lzoblejqtq7szojcjvbwsuirio4vzqde@pycq45idu6jj> In-Reply-To: <6a3e9019.1f234.5366f33f@gitrepo.freebsd.org>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --] On Fri, Jun 26, 2026 at 02:43:37PM +0000, Dag-Erling Smørgrav wrote: > The branch main has been updated by des: > > URL: https://cgit.FreeBSD.org/src/commit/?id=f0a861efbafeb81428d5e8c23dac9da73fe14007 > > commit f0a861efbafeb81428d5e8c23dac9da73fe14007 > Author: Dag-Erling Smørgrav <des@FreeBSD.org> > AuthorDate: 2026-06-26 14:43:26 +0000 > Commit: Dag-Erling Smørgrav <des@FreeBSD.org> > CommitDate: 2026-06-26 14:43:26 +0000 > > local-unbound-setup: Support IPv6-only systems > > * In the server configuration, disable protocols not supported by the > kernel. > > * In resolv.conf, instead of only using 127.0.0.1, use either 127.0.0.1, > ::1, or both depending on which protocols the kernel supports. > > MFC after: 1 week > Reviewed by: jlduran > Differential Revision: https://reviews.freebsd.org/D57840 > --- > usr.sbin/unbound/setup/local-unbound-setup.sh | 50 +++++++++++++++++++++------ > 1 file changed, 40 insertions(+), 10 deletions(-) > > diff --git a/usr.sbin/unbound/setup/local-unbound-setup.sh b/usr.sbin/unbound/setup/local-unbound-setup.sh > index ec3aeb673ecc..6b217ec574cd 100755 > --- a/usr.sbin/unbound/setup/local-unbound-setup.sh > +++ b/usr.sbin/unbound/setup/local-unbound-setup.sh > @@ -72,6 +72,19 @@ RE_forward_addr="((${RE_ipv4}|${RE_ipv6})(@${RE_port})?)" > RE_forward_name="(${RE_dnsname}(@${RE_port})?)" > RE_forward_tls="(${RE_forward_addr}(#${RE_dnsname})?)" > > +# > +# Check if a kernel feature is available > +# > +has_feature() { > + local name=$1 v > + eval "v=\$kern_features_${name}" > + if [ -z "$v" ] ; then > + v="$(sysctl -qn "kern.features.${name}")" > + eval "kern_features_${name}=$((v))" > + fi > + return $((!v)) > +} > + The function above seems like it might be useful outside the context of local-unbound. I'm wondering if this would be a better fit for libexec/rc/rc.subr. Thanks, -- Shawn Webb Cofounder / Security Engineer HardenedBSD Signal Username: shawn_webb.74 Tor-ified Signal: +1 (719) 756-1197 / activist_opsec.27 https://git.hardenedbsd.org/hardenedbsd/pubkeys/-/raw/master/Shawn_Webb/03A4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc [-- Attachment #2 --] -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEA6TL67gupaZ9nzhT/y5nonf44foFAmo+xd4ACgkQ/y5nonf4 4fokIBAAgKWBEYIfmF3JWpbF6vhFIpXVUIp4W/0NErQQRe/NXU87EPcgc7APlXBk X7CMVygXu2kbOjvxErrcPzvZq/MkPuzy92igG1y0eeD0zTaIQq0P7yapwERimOx/ emghJhY/c11luf8cFAwjd+WFHQG0bgax+0ifXEXLAYUtGZ95+AQrk1z0iJQZp4W9 HerfLX4qxTKZeMu3p+zrbvBNNAoNVdbFJVUUcdx9PQPawS8n1OJMEyAEUYZ++NnY bbSWPL7QJGHpavbrPfLuBvdPi5QTJYgM03EBHHcFrKYJhLnsXIBb/h3AbDbjrbhI M/tqwLe6IWHbczVBh3d6zF2QEiQuDpcg5+LpB+ibTm7/LdLMREc4QcrY133B+9Xg ghfOg+lQIhm/yhiKaVSA0mc2rO939e/djAVbi2HnSpvWO6+DBRvYRwRtfPAZ8Zq1 xkHeZhp27rQ5myEgifbcU7urF2CqlKiyJByQCk0axEgb6qXotsID3wHTjhj95mQx fsh+jhkZLgqOvw+hkULtsHD5Wd9WAhTKwrXrrhN9UCO8bhuCRTo69hPTXfRVlwrp 0PkTC74PZWM4KWRlKKZgqxinjdg/1AAoiiDqbXCxYUrF6IWFAQCnR135Pz4h0aeD gaNJHo2ndXhaS8c97d+8fnYDaLbbv97eUSndJZWiPtzYYSH7Y/w= =r0P8 -----END PGP SIGNATURE-----home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?lw6bx5ijns2rqkr7i3lzoblejqtq7szojcjvbwsuirio4vzqde>
