From c6715ee6bf28db578a1f842d83453f3482abff67 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Thu, 19 Oct 2017 12:15:45 -0600 Subject: [PATCH] terminate MX label with null --- packer/type.mx.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packer/type.mx.js b/packer/type.mx.js index 910e47c..2b472c4 100644 --- a/packer/type.mx.js +++ b/packer/type.mx.js @@ -22,7 +22,7 @@ exports.DNS_PACKER_TYPE_MX = function (ab, dv, total, record) { // 16-bit priority and a sequence of labels as the exchange record.exchange.split('.').forEach(function (label) { mxLen += 1 + label.length; - + dv.setUint8(total, label.length, false); total += 1; @@ -31,10 +31,13 @@ exports.DNS_PACKER_TYPE_MX = function (ab, dv, total, record) { total += 1; }); }); + dv.setUint8(total, 0, false); + total += 1; + mxLen += 1; // RDLENGTH dv.setUint16(rdLenIndex, mxLen, false); - + return total; };