mirror of
https://github.com/Luzifer/rootzone.git
synced 2024-12-20 19:31:20 +00:00
Fix broken record and exit on error
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
4b028c4edb
commit
3143b16225
2 changed files with 5 additions and 5 deletions
4
main.go
4
main.go
|
@ -46,7 +46,7 @@ func init() {
|
||||||
"iana-tld-list": "https://data.iana.org/TLD/tlds-alpha-by-domain.txt",
|
"iana-tld-list": "https://data.iana.org/TLD/tlds-alpha-by-domain.txt",
|
||||||
"internic-root": "https://www.internic.net/domain/named.root",
|
"internic-root": "https://www.internic.net/domain/named.root",
|
||||||
"opennic-filter": strings.Join([]string{".", "opennic.glue."}, ","),
|
"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 {
|
if err := rconfig.ParseAndValidate(&cfg); err != nil {
|
||||||
log.Fatalf("Unable to parse commandline options: %s", err)
|
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)
|
masters, err := resolver(tld)
|
||||||
if err != nil {
|
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
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ func getOpenNICTLDs() ([]string, error) {
|
||||||
m := new(dns.Msg)
|
m := new(dns.Msg)
|
||||||
m.SetQuestion("tlds.opennic.glue.", dns.TypeTXT)
|
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 {
|
if err != nil {
|
||||||
return nil, errors.Wrap(err, "Could not query nameservers")
|
return nil, errors.Wrap(err, "Could not query nameservers")
|
||||||
}
|
}
|
||||||
|
@ -42,7 +42,7 @@ func getOpenNICZoneMasters(tld string) ([]string, error) {
|
||||||
m := new(dns.Msg)
|
m := new(dns.Msg)
|
||||||
m.SetQuestion(tld+"opennic.glue.", dns.TypeCNAME)
|
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 {
|
if err != nil {
|
||||||
return nil, errors.Wrap(err, "Could not query nameservers")
|
return nil, errors.Wrap(err, "Could not query nameservers")
|
||||||
}
|
}
|
||||||
|
@ -65,7 +65,7 @@ func getOpenNICZoneMasters(tld string) ([]string, error) {
|
||||||
m = new(dns.Msg)
|
m = new(dns.Msg)
|
||||||
m.SetQuestion(master, dns.TypeA)
|
m.SetQuestion(master, dns.TypeA)
|
||||||
|
|
||||||
r, _, err := c.Exchange(m, cfg.OpenNICRoot)
|
r, _, err := c.Exchange(m, cfg.OpenNICRoot+":53")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, errors.Wrap(err, "Could not query nameservers")
|
return nil, errors.Wrap(err, "Could not query nameservers")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue