internal/router: disable native dot on merlin

While at it, also ensure custom config is ignored when running on
router, because we need to point to 127.0.0.1:53 (dnsmasq listener).
This commit is contained in:
Cuong Manh Le
2023-05-05 21:25:54 +07:00
committed by Cuong Manh Le
parent be497a68de
commit 5b6a3a4c6f
4 changed files with 107 additions and 57 deletions
+7
View File
@@ -743,6 +743,13 @@ func processCDFlags() {
listener.Port = 53
}
}
// On router, we want to keep the listener address point to dnsmasq listener, aka 127.0.0.1:53.
if router.Name() != "" {
if lc := cfg.Listener["0"]; lc != nil {
lc.IP = "127.0.0.1"
lc.Port = 53
}
}
} else {
cfg = ctrld.Config{}
cfg.Network = make(map[string]*ctrld.NetworkConfig)