1
0
Fork 0
mirror of https://github.com/M66B/NetGuard.git synced 2025-01-01 12:54:07 +00:00

Fixed DNS nxdomain packet size

This commit is contained in:
M66B 2017-03-04 14:07:58 +01:00
parent ab8df1cebb
commit c526b50afd

View file

@ -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++) {
off = get_qname(data, *datalen, (uint16_t) off, name);
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->auth_count = 0;
dns->add_count = 0;
*datalen = sizeof(struct dns_header);
*datalen = aoff;
char source[INET6_ADDRSTRLEN + 1];
char dest[INET6_ADDRSTRLEN + 1];