avoid a potential crash
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
d6f15e9e22
commit
e476e50d48
|
@ -64,6 +64,13 @@ func HandleConnection(conn *net.TCPConn) {
|
|||
log.Println("Recieved client hostname as:", clientHostname)
|
||||
|
||||
dnsRR := Dnstrace(clientHostname, "AAAA")
|
||||
if (dnsRR == nil) {
|
||||
log.Println("dnsRR IS NIL")
|
||||
log.Println("dnsRR IS NIL")
|
||||
log.Println("dnsRR IS NIL")
|
||||
conn.Close()
|
||||
return
|
||||
}
|
||||
ipaddr := dns.Field(dnsRR, 1)
|
||||
log.Println("Client claims to be: ", ipaddr)
|
||||
log.Println("Serving to IPv6 client:", ipv6client)
|
||||
|
|
Loading…
Reference in New Issue