mirror of
https://github.com/coredns/coredns.git
synced 2025-10-27 08:14:18 -04:00
Use dns.port argument as default
Make DefaultPort just be 53. And use the value of Port to make the zone stanzas complete (instead of defaulting to 53 always). This allows you to override the port with dns.port.
This commit is contained in:
@@ -39,7 +39,7 @@ func normalizeZone(str string) (zoneAddr, error) {
|
||||
}
|
||||
|
||||
if port == "" {
|
||||
port = "53"
|
||||
port = Port
|
||||
}
|
||||
|
||||
return zoneAddr{Zone: strings.ToLower(dns.Fqdn(host)), Port: port}, err
|
||||
|
||||
@@ -128,13 +128,13 @@ func groupConfigsByListenAddr(configs []*Config) (map[string][]*Config, error) {
|
||||
|
||||
const (
|
||||
// DefaultPort is the default port.
|
||||
DefaultPort = "2053"
|
||||
DefaultPort = "53"
|
||||
)
|
||||
|
||||
// These "soft defaults" are configurable by
|
||||
// command line flags, etc.
|
||||
var (
|
||||
// Port is the site port
|
||||
// Port is the port we listen on by default.
|
||||
Port = DefaultPort
|
||||
|
||||
// GracefulTimeout is the maximum duration of a graceful shutdown.
|
||||
|
||||
Reference in New Issue
Block a user