X Tutup
Skip to content

daemon: Fix DNS config corruption on reload#52060

Merged
thaJeztah merged 1 commit intomoby:masterfrom
vvoland:daemon-reload-ip
Feb 19, 2026
Merged

daemon: Fix DNS config corruption on reload#52060
thaJeztah merged 1 commit intomoby:masterfrom
vvoland:daemon-reload-ip

Conversation

@vvoland
Copy link
Contributor

@vvoland vvoland commented Feb 19, 2026

The copystructure library uses reflection to deep-copy structs, but cannot access unexported fields in netip.Addr, resulting in zero-value copies.

This caused DNS configuration to be corrupted after daemon reload (SIGHUP), with containers getting "invalid IP" in /etc/resolv.conf.

Register a custom copier for netip.Addr that returns the value as-is, which works because netip.Addr is an immutable value type.

- Human readable description for the release notes

Fix DNS config corruption on daemon reload

- A picture of a cute animal (not mandatory but encouraged)

The copystructure library uses reflection to deep-copy structs, but
cannot access unexported fields in netip.Addr, resulting in zero-value
copies.

This caused DNS configuration to be corrupted after daemon reload
(SIGHUP), with containers getting "invalid IP" in /etc/resolv.conf.

Register a custom copier for netip.Addr that returns the value as-is,
which works because netip.Addr is an immutable value type.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
@vvoland vvoland added this to the 29.2.2 milestone Feb 19, 2026
@vvoland vvoland self-assigned this Feb 19, 2026
@vvoland vvoland added the kind/bugfix PR's that fix bugs label Feb 19, 2026
Copy link
Contributor

@robmry robmry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

(I wondered if it'd be worth adding a copier for netip.Prefix too. But it'll probably be better to just get rid of copystructure at some point, looks like it's only used in that one place.)

@vvoland
Copy link
Contributor Author

vvoland commented Feb 19, 2026

Yeah I think we should just move off copystructure as it's archived and unmaintained now.

@thaJeztah
Copy link
Member

Yeah, I was checking if there was a "blessed" fork, but doesn't appear to be for this one; https://gist.github.com/mitchellh/90029601268e59a29e64e55bab1c5bdc

Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@thaJeztah
Copy link
Member

Ignoring the oracle failure; maybe we need to raise the timeout somewhere;

=== FAIL: amd64.docker.docker.integration.networking  (0.00s)
INFO: Testing against a local daemon
panic: test timed out after 10m0s

@thaJeztah thaJeztah merged commit fa87120 into moby:master Feb 19, 2026
185 of 189 checks passed
@vvoland vvoland modified the milestones: 29.2.2, 29.3.0 Feb 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

3 participants

X Tutup