BUG/MINOR: dns: Fix check on nameserver in snr_resolution_cb
snr_resolution_cb can be called with <nameserver> parameter set to NULL. So we must check it before using it. This is done most of time, except when we deal with invalid DNS response.
This commit is contained in:
parent
ccbc3fd9f9
commit
3bbd65b23e
|
@ -3990,10 +3990,11 @@ int snr_resolution_cb(struct dns_requester *requester, struct dns_nameserver *na
|
|||
return 1;
|
||||
|
||||
invalid:
|
||||
if (nameserver)
|
||||
if (nameserver) {
|
||||
nameserver->counters.invalid += 1;
|
||||
if (resolution->nb_responses >= nameserver->resolvers->count_nameservers)
|
||||
goto update_status;
|
||||
if (resolution->nb_responses >= nameserver->resolvers->count_nameservers)
|
||||
goto update_status;
|
||||
}
|
||||
|
||||
snr_update_srv_status(s, has_no_ip);
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue