aboutsummaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorLuca Deri <lucaderi@users.noreply.github.com>2015-06-24 17:42:00 -0700
committerLuca Deri <lucaderi@users.noreply.github.com>2015-06-24 17:42:00 -0700
commit40292a737a994f0a9c36bcaf2c20a269e5673594 (patch)
tree38b517e8c42945c2400187905744b5f7e2887c67 /src/lib
parent8d5dda9d33fb572110af01300946a12fb2eec2a4 (diff)
parent1d9d0b89abdb91abff97a56635ab9b43cea1c981 (diff)
Merge pull request #38 from jnicholls/dns-fix
Account for the skipping of the DNS RR CLASS field by progressing theā€¦
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/protocols/dns.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/protocols/dns.c b/src/lib/protocols/dns.c
index 631514afd..ee1ffdf5f 100644
--- a/src/lib/protocols/dns.c
+++ b/src/lib/protocols/dns.c
@@ -170,7 +170,7 @@ void ndpi_search_dns(struct ndpi_detection_module_struct *ndpi_struct, struct nd
i += 4;
if(header.answer_rrs > 0) {
- u_int16_t rsp_type /*, rsp_class */;
+ u_int16_t rsp_type;
u_int16_t num;
for(num = 0; num < header.answer_rrs; num++) {
@@ -186,9 +186,9 @@ void ndpi_search_dns(struct ndpi_detection_module_struct *ndpi_struct, struct nd
i += data_len;
rsp_type = get16(&i, packet->payload);
- // rsp_class = get16(&i, packet->payload);
- i += 4;
+ // Skip past the CLASS (2 octets) and TTL (4 octets) fields.
+ i += 6;
data_len = get16(&i, packet->payload);
if((data_len <= 1) || (data_len > (packet->payload_packet_len-i))) {