cmd/ctrld: use NetworkManager to disable DNS manager

Currently, ctrld force NetworkManager ignore auto DNS setup from DHCP
per connection. This does not work well, because an interface can be
attached to many connections. So if `ctrld` started with a connection,
then user connect to new one, the DNS configured by ctrld will be
override.

Instead, we can force NetworkManager not to manage DNS by:

 - Using dns=none
 - Set systemd-resolved=false

So NetworkManager won't attempt to send DNS setup to systemd-resolved,
leaving what ctrld set as-is.
This commit is contained in:
Cuong Manh Le
2023-02-02 13:56:30 +07:00
committed by Cuong Manh Le
parent 1c2cd555bd
commit eb0dd6235e
8 changed files with 100 additions and 54 deletions
+1
View File
@@ -3,6 +3,7 @@ module github.com/Control-D-Inc/ctrld
go 1.19
require (
github.com/coreos/go-systemd/v22 v22.3.3-0.20220203105225-a9a7ef127534
github.com/go-playground/validator/v10 v10.11.1
github.com/hashicorp/golang-lru/v2 v2.0.1
github.com/insomniacslk/dhcp v0.0.0-20211209223715-7d93572ebe8e