dnsr seems to have issues resolving records if there is a 2+ labels down delegation in the mix.
As a test example, I've delegated subdeleg.notdel.notdel.notdel.notdel.kakwalab.ovh. (note the notdel intermediary labels) from kakwalab.ovh. and created an A test record record.subdeleg.notdel.notdel.notdel.notdel.kakwalab.ovh. with value 1.1.1.1.
package main
import (
"fmt"
"os"
"github.com/domainr/dnsr"
)
func main() {
// Create a new DNS resolver
resolver := dnsr.NewResolver()
// The IP to reverse lookup (PTR query)
rec := "record.subdeleg.notdel.notdel.notdel.notdel.kakwalab.ovh."
dnsr.MaxNameservers = 1
dnsr.MaxIPs = 1
dnsr.DebugLogger = os.Stdout
// Query A record (nil)
results := resolver.Resolve(rec, "A")
fmt.Printf("%#v\n", results)
// Query again (has response (thanks to cache?))
// results = resolver.Resolve(rec, "A")
// fmt.Printf("%#v\n", results)
}
Using the above code returns a nil object while dig record.subdeleg.notdel.notdel.notdel.notdel.kakwalab.ovh. A properly returns 1.1.1.1.
This seems to come from the fact dnsr only query for NS one label down.
This issue is common for PTR resolution.
Note:
dnsr seems to have issues resolving records if there is a 2+ labels down delegation in the mix.
As a test example, I've delegated
subdeleg.notdel.notdel.notdel.notdel.kakwalab.ovh.(note thenotdelintermediary labels) fromkakwalab.ovh.and created anAtest recordrecord.subdeleg.notdel.notdel.notdel.notdel.kakwalab.ovh.with value1.1.1.1.Using the above code returns a
nilobject whiledig record.subdeleg.notdel.notdel.notdel.notdel.kakwalab.ovh. Aproperly returns1.1.1.1.This seems to come from the fact dnsr only query for NS one label down.
This issue is common for
PTRresolution.Note: