summaryrefslogtreecommitdiffhomepage
path: root/scripts
diff options
context:
space:
mode:
authorEmīls <emils@mullvad.net>2021-02-19 00:44:14 +0000
committerEmīls Piņķis <emils@mullvad.net>2021-03-02 11:45:54 +0000
commit5d8fe0f8e75fd0b942285d3782c358a37d3dc34c (patch)
tree1286fa532eab12089a1bbcec092b8e65e69a7988 /scripts
parente84c98a0d51b630d37c9ba41bf825dbe3c6e2328 (diff)
downloadmullvadvpn-5d8fe0f8e75fd0b942285d3782c358a37d3dc34c.tar.xz
mullvadvpn-5d8fe0f8e75fd0b942285d3782c358a37d3dc34c.zip
Watch DNS config changes in systemd-resolved
Certain NM versions will overwrite systemd-resovled config when they're reapplying existing config, this can be invoked `nmcli general reload dns-full` or by receiving a new DHCP lease. NM will just wipe the config for interfaces it doesn't have the config for in systemd-resolved, and since our daemon prefers systemd-resolved over NM, our config would be wiped. To fix this, I've changed the systemd-resolved DNS code to listen to changes to the global DNS config and reapply the tunnel interface DNS config if it's changed in any way. To better seperate the conecrns, the systemd-resolved DBus specific code was moved to the `talpid-dbus` crate, and the DNS code that manages the state and applies changes remains in `talpid-core`. One other solution that was considered was to just prefer NM over systemd-resolved, and we already kind of could do that, but the coming NM versions (1.28 and up) seem to not be able to manage DNS via it's own /etc/resolv.conf.
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions