zoneMatch is not used

This commit is contained in:
Miek Gieben 2014-08-30 15:09:01 +01:00
parent 85189d35e4
commit 18c150f21a
1 changed files with 0 additions and 26 deletions

26
dns.go
View File

@ -180,32 +180,6 @@ func (h *RR_Header) len() int {
return l
}
// Find best matching pattern for zone.
func zoneMatch(pattern, zone string) (ok bool) {
if len(pattern) == 0 {
return
}
if len(zone) == 0 {
zone = "."
}
// pattern = Fqdn(pattern) // should already be a fqdn
zone = Fqdn(zone)
i := 0
for {
ok = pattern[len(pattern)-1-i] == zone[len(zone)-1-i]
i++
if !ok {
break
}
if len(pattern)-1-i < 0 || len(zone)-1-i < 0 {
break
}
}
return
}
// ToRFC3597 converts a known RR to the unknown RR representation
// from RFC 3597.
func (rr *RFC3597) ToRFC3597(r RR) error {