ndb/dns: fix nil dereference crash with convM2DNS() returning reqmsg.qd == nil
This commit is contained in:
parent
45333cdc92
commit
0ceeee4c8b
2 changed files with 11 additions and 0 deletions
|
@ -122,6 +122,12 @@ main(int argc, char *argv[])
|
|||
reqmsg.flags & Omask, caller);
|
||||
break;
|
||||
}
|
||||
|
||||
if(reqmsg.qd == nil){
|
||||
dnslog("server: no question RR from %s", caller);
|
||||
break;
|
||||
}
|
||||
|
||||
if(debug)
|
||||
dnslog("[%d] %d: serve (%s) %d %s %s",
|
||||
getpid(), req.id, caller,
|
||||
|
|
|
@ -215,6 +215,11 @@ restart:
|
|||
goto freereq;
|
||||
}
|
||||
|
||||
if(reqmsg.qd == nil){
|
||||
dnslog("server: no question RR from %I", buf);
|
||||
goto freereq;
|
||||
}
|
||||
|
||||
if(debug || (trace && subsume(trace, reqmsg.qd->owner->name)))
|
||||
dnslog("%d: serve (%I/%d) %d %s %s",
|
||||
req.id, buf, uh->rport[0]<<8 | uh->rport[1],
|
||||
|
|
Loading…
Reference in a new issue