Tolerate ErrDumpInterrupted when listing tun addresses - #1835
Merged
johnmaguire merged 1 commit intoJul 31, 2026
Conversation
johnmaguire
force-pushed
the
tolerate-dump-interrupted
branch
from
July 31, 2026 18:05
ed30f47 to
5eb2097
Compare
nbrownus
approved these changes
Jul 31, 2026
nbrownus
left a comment
Collaborator
There was a problem hiding this comment.
I think this is fine, worst case seems that we carry over some auto conf addresses that nebula won't process packets for anyway.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Since the bump to netlink v1.3.0,
netlink.AddrListreturnsErrDumpInterrupted("results may be incomplete or inconsistent") when the kernel setsNLM_F_DUMP_INTRon an address dump.addIPstreats any error fromAddrListas fatal, so a transient interrupted dump aborts startup:Before v1.3.0, the pinned netlink release had no
NLM_F_DUMP_INTRhandling at all and silently returned partial results, so this condition was previously invisible.Root cause
The dump is racing nebula's own setup.
RTM_GETADDRdumps addresses for the whole system, and the kernel flags the dump as interrupted if any address changes between recvmsg batches. When the cert contains an IPv6 network, theAddrReplacea few lines above returns while the new address is still tentative; the kernel's DAD worker flips it to preferred asynchronously ~100-400us later, and that flip lands inside the immediately-following dump. The race is entirely self-contained - no concurrent restart or interface churn is required, and the hit rate scales with how many addresses are on the host (more dump batches = wider window).Reproduced with a standalone tool replaying this exact netlink sequence on a host with ~80 addresses: an IPv6 /80 alone interrupts 10/200 cycles and v4+v6 together 16/200, while IPv4-only runs 0/800.
ip -ts monitor addrshows the tentative add and the async flag-clear as two events during the dump window. Hosts with DAD disabled (net.ipv6.conf.all.accept_dad=0, e.g. LXC containers) never reproduce, confirming the flip is the trigger. Observed in the wild as dnclient package upgrades reliably failing their post-install restart (systemd start timeout, package left half-configured).How
Treat
ErrDumpInterruptedas success with a warning. netlink still returns the partial result set alongside the error, and this call site only uses the list to prune addresses that are not in the certs; a missed stale address survives until the next reload, which is strictly better than failing startup. All cert addresses were already applied viaAddrReplaceabove.