BUG/MINOR: dns: parsing error of some DNS response
The function which parses a DNS response buffer did not move properly a
pointer when reading a packet where records does not use DNS "message
compression" techniques.
Thanks to 0yvind Johnsen for the help provided during the troubleshooting
session.
diff --git a/src/dns.c b/src/dns.c
index fee5f5f..7f71ac7 100644
--- a/src/dns.c
+++ b/src/dns.c
@@ -504,6 +504,8 @@
return DNS_RESP_INVALID;
if (memcmp(ptr, dn_name, dn_name_len) != 0)
return DNS_RESP_WRONG_NAME;
+
+ reader += (dn_name_len + 1);
}
else {
reader += (len + 1);