Page MenuHomeFreeBSD

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

Authored by des on Jun 25 2026, 3:06 AM.
Tags
None
Referenced Files
F163982981: D57840.id180593.diff
Mon, Jul 27, 3:56 PM
F163972589: D57840.id180609.diff
Mon, Jul 27, 2:25 PM
Unknown Object (File)
Sat, Jul 25, 12:37 PM
Unknown Object (File)
Fri, Jul 24, 11:15 PM
Unknown Object (File)
Fri, Jul 24, 6:32 PM
Unknown Object (File)
Thu, Jul 23, 8:48 PM
Unknown Object (File)
Thu, Jul 23, 10:48 AM
Unknown Object (File)
Thu, Jul 23, 10:30 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 Skipped
Unit
Tests Skipped
Build Status
Buildable 74227
Build 71110: arc lint + arc unit

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.