Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 27 Jun 2026 17:51:02 +0000
From:      Shawn Webb <shawn.webb@hardenedbsd.org>
To:        Alexey Dokuchaev <danfe@freebsd.org>
Cc:        Dag-Erling Sm??rgrav <des@freebsd.org>, 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:  <azvw3iy45tvnaxqpl5f3vnxg2sqryl542dzzdf72xofinyhzk2@roskr56qfjg7>
In-Reply-To: <akAJtmefmzbtVWmU@FreeBSD.org>
References:  <6a3e9019.1f234.5366f33f@gitrepo.freebsd.org> <lw6bx5ijns2rqkr7i3lzoblejqtq7szojcjvbwsuirio4vzqde@pycq45idu6jj> <4hcpjimtjtfgsaloqpcibtjwxrn4kvimboed62ad7qbm2m3f7h@7iyktwsc3pij> <akAJtmefmzbtVWmU@FreeBSD.org>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
On Sat, Jun 27, 2026 at 05:34:46PM +0000, Alexey Dokuchaev wrote:
> On Sat, Jun 27, 2026 at 05:15:55PM +0000, Shawn Webb wrote:
> > On Fri, Jun 26, 2026 at 06:33:18PM +0000, Shawn Webb wrote:
> > > On Fri, Jun 26, 2026 at 02:43:37PM +0000, Dag-Erling Sm?rgrav wrote:
> > > > commit f0a861efbafeb81428d5e8c23dac9da73fe14007
> > > > [...]
> > > > +#
> > > > +# 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.
> > 
> > Ah, I partially misread the commit. Nevermind about the question above.
> 
> Could you explain?  This still looks like a useful function to have
> outside the context of local-unbound.

rc.subr has a function called check_kern_features that operates in a
similar fashion. I suspect the two implementations could probably be
unified, but that would probably be orthogonal to this particular
commit.

I suspect a discussion of maintaining a library of useful shell script
functions outside the context of both rc and local-unbound could be
had. I'm pretty sure there's quite a few paint buckets at the ready to
paint this particular bike shed. ;-)

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/y5nonf44foFAmpADX8ACgkQ/y5nonf4
4frAXhAAji/R34zJ8tx1VwOHnvzRaa3qlELwTT4Am6Wsy5caH4tXdDZbiH2fj4Ln
JVIqogitOgjh1w8jVxGYq2fubLE9+IEwyVP2/HFqqCGuY1LjkxyYDg3XxJ9gvevq
WQQMf5NO/5YmtkF4wviB4RYhD5ifqrTk5h/4uTn9N2uLuItiBPtXQBiDNhSM+WRS
3CserqEtMsxBRyR3dBZsaeEkf5Wn3NyUzQCuJtzzHUzWBYDZFZDb0Kl9F1PGMLz/
mX1Zpv6oCLVVTqkTbzmqFoTfX6Jjzv8wRn9Bng855tfWhpHm79S0l2q0kcf7eCUG
TOcDFPxIsLQHGzjRFYBrKsN4hLYbllo0koVP5Gj4lHSiy8C+VcNTfAVV69gL+15s
km+MwYu1C9oJ4fDMcq1Nlqr+z4XK5FHUls8Fs5rJ6O3KRYz+MqcxFHlF4EsghPJ7
OlGlGL9VevKWMEuscTU6IAW44NHxRvyq/2wZhNaOmNDqtcOgvkViZSxIGfBKL5p3
LMjBPaC8gGBj78f6WouaCl6cCrB8fgGrpQu/eo1dzAfUtbS3/LMw3jJ5B0xljr+8
sbnVwv5P4GhxxjHr8snJyQ3lAse45c+IvJxdC8Aoze7UGivxiNHz59t2EJeNW8X6
/tBA8s+TntmebtO8GeJNZCgn1gx8vJqugJhvRJRbXHyEtXIVd6I=
=WOha
-----END PGP SIGNATURE-----
home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?azvw3iy45tvnaxqpl5f3vnxg2sqryl542dzzdf72xofinyhzk2>