This commit is contained in:
Miek Gieben 2013-01-22 13:27:48 +01:00
parent ecaf48ed4b
commit 9cd656b377
2 changed files with 10 additions and 1 deletions

View File

@ -14,7 +14,7 @@
// Basic use pattern for a server to check if (and which) options are set:
//
// // o is a dns.OPT
// for _, s := range o.Options {
// for _, s := range o.Option {
// switch e := s.(type) {
// case *dns.EDNS0_NSID:
// // do stuff with e.Nsid

View File

@ -72,6 +72,15 @@ func handleReflect(w dns.ResponseWriter, r *dns.Msg) {
v4 = a.To4() != nil
}
if o := r.IsEdns0(); o != nil {
for _, s := range o.Options {
switch e = s.(type) {
case *dns.EDNS0_SUBNET:
println("SUBNET")
}
}
}
if v4 {
rr = new(dns.A)
rr.(*dns.A).Hdr = dns.RR_Header{Name: dom, Rrtype: dns.TypeA, Class: dns.ClassINET, Ttl: 0}