mirror of
https://github.com/yarrick/iodine.git
synced 2024-11-22 16:19:20 +02:00
Merge pull request #25 from chengzhicn/master
check error returned by dns_decode
This commit is contained in:
commit
cd5bedca74
|
@ -2068,7 +2068,7 @@ read_dns(int fd, struct dnsfd *dns_fds, int tun_fd, struct query *q)
|
||||||
if (raw_decode(packet, r, q, fd, dns_fds, tun_fd)) {
|
if (raw_decode(packet, r, q, fd, dns_fds, tun_fd)) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if (dns_decode(NULL, 0, q, QR_QUERY, packet, r) < 0) {
|
if (dns_decode(NULL, 0, q, QR_QUERY, packet, r) <= 0) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue