From 3143b16225b72a0237b24d2a5fdf5762d32c7ee6 Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Sat, 25 May 2019 17:22:20 +0200 Subject: [PATCH] Fix broken record and exit on error Signed-off-by: Knut Ahlers --- main.go | 4 ++-- opennic.go | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/main.go b/main.go index 3a3c83f..5ca5192 100644 --- a/main.go +++ b/main.go @@ -46,7 +46,7 @@ func init() { "iana-tld-list": "https://data.iana.org/TLD/tlds-alpha-by-domain.txt", "internic-root": "https://www.internic.net/domain/named.root", "opennic-filter": strings.Join([]string{".", "opennic.glue."}, ","), - "opennic-root": "75.127.96.89:53", + "opennic-root": "75.127.96.89", }) if err := rconfig.ParseAndValidate(&cfg); err != nil { log.Fatalf("Unable to parse commandline options: %s", err) @@ -128,7 +128,7 @@ func setRootsFromTLDs(roots map[string][]string, rootsMutex *sync.Mutex, tlds [] masters, err := resolver(tld) if err != nil { - log.WithError(err).WithField("zone", tld).Error("Unable to retrieve zone masters") + log.WithError(err).WithField("zone", tld).Fatal("Unable to retrieve zone masters") return } diff --git a/opennic.go b/opennic.go index acf8c26..eccccb0 100644 --- a/opennic.go +++ b/opennic.go @@ -13,7 +13,7 @@ func getOpenNICTLDs() ([]string, error) { m := new(dns.Msg) m.SetQuestion("tlds.opennic.glue.", dns.TypeTXT) - r, _, err := c.Exchange(m, cfg.OpenNICRoot) + r, _, err := c.Exchange(m, cfg.OpenNICRoot+":53") if err != nil { return nil, errors.Wrap(err, "Could not query nameservers") } @@ -42,7 +42,7 @@ func getOpenNICZoneMasters(tld string) ([]string, error) { m := new(dns.Msg) m.SetQuestion(tld+"opennic.glue.", dns.TypeCNAME) - r, _, err := c.Exchange(m, cfg.OpenNICRoot) + r, _, err := c.Exchange(m, cfg.OpenNICRoot+":53") if err != nil { return nil, errors.Wrap(err, "Could not query nameservers") } @@ -65,7 +65,7 @@ func getOpenNICZoneMasters(tld string) ([]string, error) { m = new(dns.Msg) m.SetQuestion(master, dns.TypeA) - r, _, err := c.Exchange(m, cfg.OpenNICRoot) + r, _, err := c.Exchange(m, cfg.OpenNICRoot+":53") if err != nil { return nil, errors.Wrap(err, "Could not query nameservers") }