mirror of
https://github.com/M66B/NetGuard.git
synced 2025-01-04 06:23:04 +00:00
Fixed DNS nxdomain packet size
This commit is contained in:
parent
ab8df1cebb
commit
c526b50afd
1 changed files with 2 additions and 1 deletions
|
@ -106,6 +106,7 @@ void parse_dns_response(const struct arguments *args, const struct udp_session *
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int32_t aoff = off;
|
||||||
for (int a = 0; a < acount; a++) {
|
for (int a = 0; a < acount; a++) {
|
||||||
off = get_qname(data, *datalen, (uint16_t) off, name);
|
off = get_qname(data, *datalen, (uint16_t) off, name);
|
||||||
if (off > 0 && off + 10 <= *datalen) {
|
if (off > 0 && off + 10 <= *datalen) {
|
||||||
|
@ -165,7 +166,7 @@ void parse_dns_response(const struct arguments *args, const struct udp_session *
|
||||||
dns->ans_count = 0;
|
dns->ans_count = 0;
|
||||||
dns->auth_count = 0;
|
dns->auth_count = 0;
|
||||||
dns->add_count = 0;
|
dns->add_count = 0;
|
||||||
*datalen = sizeof(struct dns_header);
|
*datalen = aoff;
|
||||||
|
|
||||||
char source[INET6_ADDRSTRLEN + 1];
|
char source[INET6_ADDRSTRLEN + 1];
|
||||||
char dest[INET6_ADDRSTRLEN + 1];
|
char dest[INET6_ADDRSTRLEN + 1];
|
||||||
|
|
Loading…
Reference in a new issue