From 43699a53f597d39109b99fe629f38251b19619a0 Mon Sep 17 00:00:00 2001 From: Sylvain Desbureaux Date: Thu, 23 Jun 2016 14:13:53 +0200 Subject: [PATCH] Fix Header decoding for DNS Bad call to the function that made the function not to work properly --- decode/dns.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/decode/dns.js b/decode/dns.js index 6267da0..712b60d 100644 --- a/decode/dns.js +++ b/decode/dns.js @@ -97,7 +97,7 @@ DNS.prototype.decode = function (raw_packet, offset) { this.offset = offset; this.id = raw_packet.readUInt16BE(offset); // 0, 1 - this.header = new DnsFlags().decode(raw_packet.readUInt16BE(this.offset+2)); + this.header = new DnsFlags().decode(raw_packet,this.offset+2); this.qdcount = raw_packet.readUInt16BE(offset + 4); // 4, 5 this.ancount = raw_packet.readUInt16BE(offset + 6); // 6, 7 this.nscount = raw_packet.readUInt16BE(offset + 8); // 8, 9