mirror of
https://github.com/netbirdio/netbird.git
synced 2026-08-25 09:01:29 +02:00
addDNSSetupForAll makes us the peer's main DNS forwarder, and the catch-all NRPT rule is the other half of that same job: without it the adapter's NameServer only adds one more resolver to the set Windows queries in parallel. Having the two in one place says that, where a separate block at the end of applyDNSConfig read as an afterthought. The block could not simply move up: removeDNSMatchPolicies deletes the catch-all key too, so installing the rule before it ran would have had the rule deleted moments later. The cleanup now runs first, which is what it was always for - it clears what the previous apply installed before this one installs anything - and keeps being unconditional, so a leftover rule from an earlier run cannot survive into a config that no longer wants it.