From e94287fbe61380f3e7ca896b0cf95270a05b903c Mon Sep 17 00:00:00 2001 From: 2bit Date: Sun, 13 Dec 2020 07:39:05 +0900 Subject: [PATCH] fixed decoding IPv6 address on decode_RR --- decode/dns.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/decode/dns.js b/decode/dns.js index 991b659..819b4bb 100644 --- a/decode/dns.js +++ b/decode/dns.js @@ -221,7 +221,7 @@ DNS.prototype.decode_RR = function (is_question) { rr.rdata = this.read_name(); this.offset -= rr.rdlength; // read_name moves offset } else if (rr.type === 28 && rr.class === 1 && rr.rdlength === 16) { - rr.data = new IPv6Addr(this.raw_packet, this.offset); + rr.rdata = new IPv6Addr().decode(this.raw_packet, this.offset); } // TODO - decode other rr types