Page MenuHomeFreeBSD

local-unbound-setup: Support IPv6-only systems
ClosedPublic

Authored by des on Jun 25 2026, 3:06 AM.
Tags
None
Referenced Files
F165509411: D57840.id180727.diff
Sat, Aug 8, 11:57 AM
F165505483: D57840.id180598.diff
Sat, Aug 8, 11:36 AM
F165503464: D57840.id180609.diff
Sat, Aug 8, 11:26 AM
F165502553: D57840.id180594.diff
Sat, Aug 8, 11:22 AM
F165473616: D57840.diff
Sat, Aug 8, 9:25 AM
F165453717: D57840.diff
Sat, Aug 8, 7:03 AM
Unknown Object (File)
Fri, Aug 7, 7:12 PM
Unknown Object (File)
Fri, Aug 7, 8:41 AM
Subscribers

Details

Summary
  • 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

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

des requested review of this revision.Jun 25 2026, 3:06 AM

Nice! Thank you!
I think we can simplify and improve the while read ... block, but that is not related to this change.

usr.sbin/unbound/setup/local-unbound-setup.sh
83

In the event someone (like me) tries to reuse this function somewhere else and sysctl returns "".

165–175

What happens to nameserver localhost (and localhost.*)?
I cannot think of a clean way to handle those without parsing /etc/hosts (which gets ugly), except for leaving nameserver localhost (or localhost.*) unchanged (can we assume that /etc/hosts and /etc/nsswitch.conf are well-configured?).

184

Quick question, if a user has: options timeout:2 attempts:5 edns0, according to the man page this should be accepted. More importantly, shouldn't we keep the other values as well?

usr.sbin/unbound/setup/local-unbound-setup.sh
83

That's not necessary, any unset or empty variable will evaluate to 0 in an arithmetic expression.

165–175

I no longer consider them valid. I considered removing them altogether but decided to just comment them out instead.

184

We do.

jlduran added inline comments.
usr.sbin/unbound/setup/local-unbound-setup.sh
2

?

This revision is now accepted and ready to land.Jun 25 2026, 9:38 AM
usr.sbin/unbound/setup/local-unbound-setup.sh
2

Apparently my Ctrl key is starting to fail...

This revision now requires review to proceed.Jun 25 2026, 10:28 AM
This revision is now accepted and ready to land.Jun 25 2026, 5:06 PM
This revision was automatically updated to reflect the committed changes.