cmd/ctrld: only ignore listener.0 setup when setup router

This commit is contained in:
Cuong Manh Le authored and Cuong Manh Le committed 2023-05-15 21:13:23 +07:00
1 parent 521f06dcc1
commit 45895067c6
1 file changed
+1 -1
+1 -1
View File
@@ -398,7 +398,7 @@ func needLocalIPv6Listener() bool {
} }
func dnsListenAddress(lcNum string, lc *ctrld.ListenerConfig) string { func dnsListenAddress(lcNum string, lc *ctrld.ListenerConfig) string {
if addr := router.ListenAddress(); addr != "" && lcNum == "0" { if addr := router.ListenAddress(); setupRouter && addr != "" && lcNum == "0" {
return addr return addr
} }
return net.JoinHostPort(lc.IP, strconv.Itoa(lc.Port)) return net.JoinHostPort(lc.IP, strconv.Itoa(lc.Port))