mirror of
https://github.com/hickory-dns/hickory-dns.git
synced 2026-04-25 11:15:54 +03:00
[GH-ISSUE #56] Listen on all addresses #335
Labels
No labels
blocked
breaking-change
bug
bug:critical
bug:tests
cleanup
compliance
compliance
compliance
crate:all
crate:client
crate:native-tls
crate:proto
crate:recursor
crate:resolver
crate:resolver
crate:rustls
crate:server
crate:util
dependencies
docs
duplicate
easy
easy
enhance
enhance
enhance
feature:dns-over-https
feature:dns-over-quic
feature:dns-over-tls
feature:dnsssec
feature:global_lb
feature:mdns
feature:tsig
features:edns
has workaround
ops
perf
platform:WASM
platform:android
platform:fuchsia
platform:linux
platform:macos
platform:windows
pull-request
question
test
tools
tools
trust
unclear
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hickory-dns#335
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @rbmj on GitHub (Oct 25, 2016).
Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/56
Currently, named doesn't actually listen on all specified addresses. It takes the first address (both v4 and v6), or a default of
0.0.0.0and::0. In addition, there's no way to disable IPv4 or IPv6 as even if an IPv4 address is specified the system still will use the default IPv6 address - even if no IPv6 address is set or even if it is explicitly set to the empty list.This breaks some dual-stack systems as well where
IPV6_V6ONLYis by default false, because the v6 socket cannot bind as it conflicts with the v4 socket.The attached patch is my attempt to fix the issue - I haven't tested every edge case, but it works on my system (debian) with the default configuration (example.toml) under simple tests, and seems sane to me.
0001-Listen-on-all-available-IP-addresses.txt
@bluejekyll commented on GitHub (Oct 25, 2016):
Thanks for submitting this. I'll try and apply the patch you submitted and put up a PR as soon as I can. This might not be for a few days though.
@rbmj commented on GitHub (Oct 26, 2016):
That sounds fine - next time I'll be less lazy and get github to do a proper fork for me.
@bluejekyll commented on GitHub (Oct 29, 2016):
See the commit I just pushed. That incorporates your fix (mostly verbatum, though I made it fail a little nicer).
I wrote a new test harness for the
namedbin, which I had been planning on doing for a while, this gave me a good reason to. Anyway, you can run these tests withcargo testor more specificallycargo test --test z_named_testto test just ipv4 listeners, and both ipv4 and ipv6. I found at least on my mac that an ipv6 only listener is still routable from ipv4 via the standard ipv4 address mapping to ipv6, not sure if that is true on other OS'edit: travis still has a bad ipv6 config, so I had to ignore the ipv6 test, you can test that with
cargo test --test z_named_test -- --ignored@bluejekyll commented on GitHub (Nov 1, 2016):
I believe that the patch I submitted fixes this. If not please reopen.