AS112 responder answers for names it is not authoritative for
kmkaplan opened this issue · 3 comments
The regular expression used to determine if a name is part of AS112 is too weak. For it marks 110.in-addr.arpa as part of AS112 while it should not.
The obvious fix, prependinging a "." to as112Regexp does not work either because the expression trigger a bug in Go's regexp library (http://code.google.com/p/go/issues/detail?id=596).
And the fix would not be perfect, even without the bug #596 because the raw 10.in-addr.arpa must match, not only *.10.in-addr.arpa. So we have two cases to test.
Of course. I meant something like:
diff --git a/as112.go b/as112.go
index 230b9a5..2eac6e6 100644
--- a/as112.go
+++ b/as112.go
@@ -113,7 +113,7 @@ func init() {
hostnameAnswers[2] = "See http://as112.net/ for more information."
as112nameServers[0] = "blackhole-1.iana.org"
as112nameServers[1] = "blackhole-2.iana.org"
- as112SubDomain, error = regexp.Compile(as112Regexp)
+ as112SubDomain, error = regexp.Compile("." + as112Regexp)
hostnamesoa.Mname = "NOT-CONFIGURED.as112.example.net" // Put the real h
hostnamesoa.Rname = "UNKNOWN.as112.example.net" // Put your email
hostnamesoa.Serial = 2003030100
Closed by 5398b04