terminate labels with null

This commit is contained in:
AJ ONeal 2017-10-19 12:53:56 -06:00
parent c6715ee6bf
commit b2dd53dcb1
3 changed files with 15 additions and 9 deletions

View File

@ -25,9 +25,11 @@ exports.DNS_PACKER_TYPE_CNAME = function (ab, dv, total, record) {
total += 1; total += 1;
}); });
}); });
dv.setUint8(total, 0x00, false);
total += 1;
// RDLENGTH // RDLENGTH
dv.setUint16(rdLenIndex, record.data.length + 1, false); dv.setUint16(rdLenIndex, record.data.length + 2, false);
return total; return total;
}; };

View File

@ -31,7 +31,7 @@ exports.DNS_PACKER_TYPE_MX = function (ab, dv, total, record) {
total += 1; total += 1;
}); });
}); });
dv.setUint8(total, 0, false); dv.setUint8(total, 0x00, false);
total += 1; total += 1;
mxLen += 1; mxLen += 1;

View File

@ -59,6 +59,10 @@ exports.DNS_PACKER_TYPE_SRV = function (ab, dv, total, record) {
}); });
}); });
dv.setUint8(total, 0x00, false);
total += 1;
srvLen += 1;
// RDLENGTH // RDLENGTH
dv.setUint16(rdLenIndex, srvLen, false); dv.setUint16(rdLenIndex, srvLen, false);