resolve CNAME
This commit is contained in:
parent
0336002980
commit
d56b459d9a
@ -409,6 +409,14 @@ func handleRequest(w dns.ResponseWriter, r *dns.Msg, zone zoneView) {
|
||||
m.Extra = append(m.Extra, zone.rr[dns.TypeAAAA][t.Ns]...)
|
||||
}
|
||||
}
|
||||
case dns.TypeCNAME:
|
||||
// Resolve CNAME
|
||||
for _, cnameRR := range m.Answer {
|
||||
if t, ok := cnameRR.(*dns.CNAME); ok {
|
||||
m.Extra = append(m.Extra, zone.rr[dns.TypeA][t.Target]...)
|
||||
m.Extra = append(m.Extra, zone.rr[dns.TypeAAAA][t.Target]...)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if len(m.Answer) == 0 {
|
||||
|
Loading…
Reference in New Issue
Block a user