|
@@ -29,7 +29,7 @@ func serve(w dns.ResponseWriter, req *dns.Msg, z *Zone) {
|
|
|
|
|
|
label := getQuestionName(z, req)
|
|
label := getQuestionName(z, req)
|
|
|
|
|
|
- var country *string
|
|
|
|
|
|
+ var country string
|
|
if geoIP != nil {
|
|
if geoIP != nil {
|
|
country = geoIP.GetCountry(w.RemoteAddr().String())
|
|
country = geoIP.GetCountry(w.RemoteAddr().String())
|
|
log.Println("Country:", country)
|
|
log.Println("Country:", country)
|
|
@@ -42,7 +42,7 @@ func serve(w dns.ResponseWriter, req *dns.Msg, z *Zone) {
|
|
}
|
|
}
|
|
m.Authoritative = true
|
|
m.Authoritative = true
|
|
|
|
|
|
- labels := z.findLabels(label, *country, qtype)
|
|
|
|
|
|
+ labels := z.findLabels(label, country, qtype)
|
|
if labels == nil {
|
|
if labels == nil {
|
|
// return NXDOMAIN
|
|
// return NXDOMAIN
|
|
m.SetRcode(req, dns.RcodeNameError)
|
|
m.SetRcode(req, dns.RcodeNameError)
|