aboutsummaryrefslogtreecommitdiff
path: root/core/dnsserver/server.go
diff options
context:
space:
mode:
Diffstat (limited to 'core/dnsserver/server.go')
-rw-r--r--core/dnsserver/server.go18
1 files changed, 16 insertions, 2 deletions
diff --git a/core/dnsserver/server.go b/core/dnsserver/server.go
index db5ef88b4..a08802204 100644
--- a/core/dnsserver/server.go
+++ b/core/dnsserver/server.go
@@ -287,8 +287,22 @@ func (s *Server) OnStartupComplete() {
return
}
- for zone, config := range s.zones {
- fmt.Println(zone + ":" + config.Port)
+ for zone := range s.zones {
+ // split addr into protocol, IP and Port
+ _, ip, port, err := SplitProtocolHostPort(s.Addr)
+
+ if err != nil {
+ // this should not happen, but we need to take care of it anyway
+ fmt.Println(zone + ":" + s.Addr)
+ return
+ }
+ if ip == "" {
+ fmt.Println(zone + ":" + port)
+ return
+ }
+ // if the server is listening on a specific address let's make it visible in the log,
+ // so one can differentiate between all active listeners
+ fmt.Println(zone + ":" + port + " on " + ip)
}
}