aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Miek Gieben <miek@miek.nl> 2016-10-07 10:14:23 +0000
committerGravatar Miek Gieben <miek@miek.nl> 2016-10-07 10:16:28 +0000
commitf29f622ec7f1eb20413a9a92fb633148a9e9c1d4 (patch)
treeec76351a8ba5b753d4df8978859e8f7d9ba1fa8f
parentea98429512c3f3fc130bfc99227bd8715ab27f07 (diff)
downloadcoredns-f29f622ec7f1eb20413a9a92fb633148a9e9c1d4.tar.gz
coredns-f29f622ec7f1eb20413a9a92fb633148a9e9c1d4.tar.zst
coredns-f29f622ec7f1eb20413a9a92fb633148a9e9c1d4.zip
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.
-rw-r--r--README.md4
-rw-r--r--core/dnsserver/address.go2
-rw-r--r--core/dnsserver/register.go4
3 files changed, 5 insertions, 5 deletions
diff --git a/README.md b/README.md
index 0834f94e1..72c4d443b 100644
--- a/README.md
+++ b/README.md
@@ -71,8 +71,8 @@ listening on port 2053, it should show the following:
~~~ txt
.:2053
-2016/09/18 09:20:50 [INFO] CoreDNS-001 starting
-CoreDNS-001 starting
+2016/09/18 09:20:50 [INFO] CoreDNS-001
+CoreDNS-001
~~~
Any query send to port 2053 should return some information; your sending address, port and protocol
diff --git a/core/dnsserver/address.go b/core/dnsserver/address.go
index c5493d3d0..fc51aed96 100644
--- a/core/dnsserver/address.go
+++ b/core/dnsserver/address.go
@@ -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
diff --git a/core/dnsserver/register.go b/core/dnsserver/register.go
index 224ba71e9..324680d03 100644
--- a/core/dnsserver/register.go
+++ b/core/dnsserver/register.go
@@ -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.