[GH-ISSUE #3401] DNS response from different IP #1179

Open
opened 2026-03-16 01:49:20 +03:00 by kerem · 0 comments
Owner

Originally created by @greenpsi on GitHub (Dec 15, 2025).
Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/3401

Describe the bug
I ran hickory-dns on a system with multiple interfaces and multiple IPs per interface.
From another system, I ran drill like this: drill @fde1:ffec:362f:9f31::1 hickory-dns.org AAAA.

drill times out after about 10s, with the following error message:

Error: error sending query: Could not send or receive, because of network error

fde1:ffec:362f:9f31::1 is statically assigned to enp1s0. But the same interface also has multiple ULA and GUA IPv6 addresses assigned via SLAAC.

In wireshark, I can see a DNS query from my client where I ran drill to fde1:ffec:362f:9f31::1 and right after that a query response from hickory-dns, but from another ULA IPv6 address (fde1:ffec:362f:9f31:fc43:2ba1:c78d:43ce) on the same interface. This is therefore missed by drill, so it repeats its request. This whole procedure repeats three times before drill times out.

Hickory logs:

2025-12-15T23:01:50.174199Z  INFO hickory_dns: Hickory DNS 0.26.0-alpha.1 starting...
2025-12-15T23:01:50.174700Z  INFO hickory_dns: loading configuration from: "/path/to/config.toml"
2025-12-15T23:01:50.174775Z  INFO hickory_server::store::recursor: loading recursor config: .
2025-12-15T23:01:50.174955Z  INFO hickory_dns: zone successfully loaded: .
2025-12-15T23:01:50.174964Z  INFO hickory_dns: binding UDP to 0.0.0.0
2025-12-15T23:01:50.174981Z  INFO hickory_dns: listening for UDP on 0.0.0.0:53
2025-12-15T23:01:50.174988Z  INFO hickory_dns: binding UDP to ::
2025-12-15T23:01:50.175003Z  INFO hickory_dns: listening for UDP on [::]:53
2025-12-15T23:01:50.175008Z  INFO hickory_dns: binding TCP to 0.0.0.0
2025-12-15T23:01:50.175021Z  INFO hickory_dns: listening for TCP on 0.0.0.0:53
2025-12-15T23:01:50.175025Z  INFO hickory_dns: binding TCP to ::
2025-12-15T23:01:50.175039Z  INFO hickory_dns: listening for TCP on [::]:53
2025-12-15T23:01:50.175047Z  INFO hickory_dns: running as root (uid: 0 gid: 0 euid: 0 egid: 0)...dropping privileges.
2025-12-15T23:01:50.175313Z  INFO hickory_dns: now running as uid: 65534, gid: 65534 (euid: 65534, egid: 65534)
2025-12-15T23:01:50.175321Z  INFO hickory_dns:
2025-12-15T23:01:50.175324Z  INFO hickory_dns:  Hickory DNS
2025-12-15T23:01:50.175326Z  INFO hickory_dns:
2025-12-15T23:01:50.175329Z  INFO hickory_dns: server starting up, awaiting connections...
2025-12-15T23:01:58.394527Z  INFO hickory_resolver::name_server_pool: creating new shared lookup query=org. IN NS
2025-12-15T23:01:58.419196Z  INFO hickory_resolver::name_server_pool: creating new shared lookup query=hickory-dns.org. IN NS
2025-12-15T23:01:58.463145Z  INFO hickory_resolver::name_server_pool: creating new shared lookup query=com. IN NS
2025-12-15T23:01:58.570873Z  INFO hickory_resolver::name_server_pool: creating new shared lookup query=hover.com. IN NS
2025-12-15T23:01:58.706456Z  INFO hickory_resolver::name_server_pool: creating new shared lookup query=ns2.hover.com. IN NS
2025-12-15T23:01:58.828187Z  WARN hickory_resolver::recursor::handle: lookup error query=Query { name: Name("ns2.hover.com."), query_type: NS, query_class: IN } error=DNS error: no records found for Query { name: Name("ns2.hover.com."), query_type: NS, query_class: IN }
2025-12-15T23:01:58.828251Z  INFO hickory_resolver::name_server_pool: creating new shared lookup query=ns1.hover.com. IN NS
2025-12-15T23:01:58.948246Z  WARN hickory_resolver::recursor::handle: lookup error query=Query { name: Name("ns1.hover.com."), query_type: NS, query_class: IN } error=DNS error: no records found for Query { name: Name("ns1.hover.com."), query_type: NS, query_class: IN }
2025-12-15T23:01:58.948306Z  INFO hickory_resolver::name_server_pool: creating new shared lookup query=ns2.hover.com. IN A
2025-12-15T23:01:58.948396Z  INFO hickory_resolver::name_server_pool: creating new shared lookup query=ns2.hover.com. IN AAAA
2025-12-15T23:01:58.948489Z  INFO hickory_resolver::name_server_pool: creating new shared lookup query=ns1.hover.com. IN A
2025-12-15T23:01:58.948550Z  INFO hickory_resolver::name_server_pool: creating new shared lookup query=ns1.hover.com. IN AAAA
2025-12-15T23:01:59.066805Z  INFO hickory_resolver::name_server_pool: creating new shared lookup query=hickory-dns.org. IN AAAA
2025-12-15T23:01:59.187971Z  INFO hickory_server::server: request:59258 src:udp://fde1:ffec:362f:9f31:7c7e:4b4d:b0bc:b15c#34281 QUERY qflags:RD response:NoError rr:4/0/0 rflags:RD,RA
2025-12-15T23:01:59.188006Z  INFO hickory_server::server: query:hickory-dns.org.:AAAA:IN
2025-12-15T23:02:03.395711Z  INFO hickory_server::server: request:59258 src:udp://fde1:ffec:362f:9f31:7c7e:4b4d:b0bc:b15c#52558 QUERY qflags:RD response:NoError rr:4/0/0 rflags:RD,RA
2025-12-15T23:02:03.395743Z  INFO hickory_server::server: query:hickory-dns.org.:AAAA:IN
2025-12-15T23:02:08.401962Z  INFO hickory_server::server: request:59258 src:udp://fde1:ffec:362f:9f31:7c7e:4b4d:b0bc:b15c#53628 QUERY qflags:RD response:NoError rr:4/0/0 rflags:RD,RA
2025-12-15T23:02:08.401995Z  INFO hickory_server::server: query:hickory-dns.org.:AAAA:IN

To Reproduce
Used config:

directory = "/var/lib/hickory-dns"
listen_addrs_ipv4 = ["0.0.0.0"]
listen_addrs_ipv6 = ["::0"]
listen_port = 53

[[zones]]
zone = "."
zone_type = "External"

[zones.stores]
roots = "/path/to/root.hints"
type = "recursor"

Invoked via sudo ./hickory-dns --config /path/to/config.toml

Expected behavior
hickory-dns should answer from the same IP address the request was sent to.

System:

  • OS: NixOS
  • Architecture: x86_64
  • Version 25.11
  • rustc version: cargo 1.91.0 (ea2d97820 2025-10-10)

Version:
built from commit 53dd4a48f9, using cargo build --release -p hickory-dns --features recursor

./hickory-dns --version
Hickory DNS named server 0.26.0-alpha.1

Can also reproduce with 0.25.2.

Originally created by @greenpsi on GitHub (Dec 15, 2025). Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/3401 **Describe the bug** I ran hickory-dns on a system with multiple interfaces and multiple IPs per interface. From another system, I ran drill like this: `drill @fde1:ffec:362f:9f31::1 hickory-dns.org AAAA`. `drill` times out after about 10s, with the following error message: ``` Error: error sending query: Could not send or receive, because of network error ``` `fde1:ffec:362f:9f31::1` is statically assigned to `enp1s0`. But the same interface also has multiple ULA and GUA IPv6 addresses assigned via SLAAC. In wireshark, I can see a DNS query from my client where I ran `drill` to `fde1:ffec:362f:9f31::1` and right after that a query response from hickory-dns, but from another ULA IPv6 address (`fde1:ffec:362f:9f31:fc43:2ba1:c78d:43ce`) on the same interface. This is therefore missed by `drill`, so it repeats its request. This whole procedure repeats three times before `drill` times out. Hickory logs: ``` 2025-12-15T23:01:50.174199Z INFO hickory_dns: Hickory DNS 0.26.0-alpha.1 starting... 2025-12-15T23:01:50.174700Z INFO hickory_dns: loading configuration from: "/path/to/config.toml" 2025-12-15T23:01:50.174775Z INFO hickory_server::store::recursor: loading recursor config: . 2025-12-15T23:01:50.174955Z INFO hickory_dns: zone successfully loaded: . 2025-12-15T23:01:50.174964Z INFO hickory_dns: binding UDP to 0.0.0.0 2025-12-15T23:01:50.174981Z INFO hickory_dns: listening for UDP on 0.0.0.0:53 2025-12-15T23:01:50.174988Z INFO hickory_dns: binding UDP to :: 2025-12-15T23:01:50.175003Z INFO hickory_dns: listening for UDP on [::]:53 2025-12-15T23:01:50.175008Z INFO hickory_dns: binding TCP to 0.0.0.0 2025-12-15T23:01:50.175021Z INFO hickory_dns: listening for TCP on 0.0.0.0:53 2025-12-15T23:01:50.175025Z INFO hickory_dns: binding TCP to :: 2025-12-15T23:01:50.175039Z INFO hickory_dns: listening for TCP on [::]:53 2025-12-15T23:01:50.175047Z INFO hickory_dns: running as root (uid: 0 gid: 0 euid: 0 egid: 0)...dropping privileges. 2025-12-15T23:01:50.175313Z INFO hickory_dns: now running as uid: 65534, gid: 65534 (euid: 65534, egid: 65534) 2025-12-15T23:01:50.175321Z INFO hickory_dns: 2025-12-15T23:01:50.175324Z INFO hickory_dns: Hickory DNS 2025-12-15T23:01:50.175326Z INFO hickory_dns: 2025-12-15T23:01:50.175329Z INFO hickory_dns: server starting up, awaiting connections... 2025-12-15T23:01:58.394527Z INFO hickory_resolver::name_server_pool: creating new shared lookup query=org. IN NS 2025-12-15T23:01:58.419196Z INFO hickory_resolver::name_server_pool: creating new shared lookup query=hickory-dns.org. IN NS 2025-12-15T23:01:58.463145Z INFO hickory_resolver::name_server_pool: creating new shared lookup query=com. IN NS 2025-12-15T23:01:58.570873Z INFO hickory_resolver::name_server_pool: creating new shared lookup query=hover.com. IN NS 2025-12-15T23:01:58.706456Z INFO hickory_resolver::name_server_pool: creating new shared lookup query=ns2.hover.com. IN NS 2025-12-15T23:01:58.828187Z WARN hickory_resolver::recursor::handle: lookup error query=Query { name: Name("ns2.hover.com."), query_type: NS, query_class: IN } error=DNS error: no records found for Query { name: Name("ns2.hover.com."), query_type: NS, query_class: IN } 2025-12-15T23:01:58.828251Z INFO hickory_resolver::name_server_pool: creating new shared lookup query=ns1.hover.com. IN NS 2025-12-15T23:01:58.948246Z WARN hickory_resolver::recursor::handle: lookup error query=Query { name: Name("ns1.hover.com."), query_type: NS, query_class: IN } error=DNS error: no records found for Query { name: Name("ns1.hover.com."), query_type: NS, query_class: IN } 2025-12-15T23:01:58.948306Z INFO hickory_resolver::name_server_pool: creating new shared lookup query=ns2.hover.com. IN A 2025-12-15T23:01:58.948396Z INFO hickory_resolver::name_server_pool: creating new shared lookup query=ns2.hover.com. IN AAAA 2025-12-15T23:01:58.948489Z INFO hickory_resolver::name_server_pool: creating new shared lookup query=ns1.hover.com. IN A 2025-12-15T23:01:58.948550Z INFO hickory_resolver::name_server_pool: creating new shared lookup query=ns1.hover.com. IN AAAA 2025-12-15T23:01:59.066805Z INFO hickory_resolver::name_server_pool: creating new shared lookup query=hickory-dns.org. IN AAAA 2025-12-15T23:01:59.187971Z INFO hickory_server::server: request:59258 src:udp://fde1:ffec:362f:9f31:7c7e:4b4d:b0bc:b15c#34281 QUERY qflags:RD response:NoError rr:4/0/0 rflags:RD,RA 2025-12-15T23:01:59.188006Z INFO hickory_server::server: query:hickory-dns.org.:AAAA:IN 2025-12-15T23:02:03.395711Z INFO hickory_server::server: request:59258 src:udp://fde1:ffec:362f:9f31:7c7e:4b4d:b0bc:b15c#52558 QUERY qflags:RD response:NoError rr:4/0/0 rflags:RD,RA 2025-12-15T23:02:03.395743Z INFO hickory_server::server: query:hickory-dns.org.:AAAA:IN 2025-12-15T23:02:08.401962Z INFO hickory_server::server: request:59258 src:udp://fde1:ffec:362f:9f31:7c7e:4b4d:b0bc:b15c#53628 QUERY qflags:RD response:NoError rr:4/0/0 rflags:RD,RA 2025-12-15T23:02:08.401995Z INFO hickory_server::server: query:hickory-dns.org.:AAAA:IN ``` **To Reproduce** Used config: ``` directory = "/var/lib/hickory-dns" listen_addrs_ipv4 = ["0.0.0.0"] listen_addrs_ipv6 = ["::0"] listen_port = 53 [[zones]] zone = "." zone_type = "External" [zones.stores] roots = "/path/to/root.hints" type = "recursor" ``` Invoked via `sudo ./hickory-dns --config /path/to/config.toml` **Expected behavior** hickory-dns should answer from the same IP address the request was sent to. **System:** - OS: NixOS - Architecture: x86_64 - Version 25.11 - rustc version: cargo 1.91.0 (ea2d97820 2025-10-10) **Version:** built from commit 53dd4a48f92698ec452f2a1de292d98a561add93, using `cargo build --release -p hickory-dns --features recursor` ``` ./hickory-dns --version Hickory DNS named server 0.26.0-alpha.1 ``` Can also reproduce with 0.25.2.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hickory-dns#1179
No description provided.