tested soa packer. It works, but doesn't utilize compression pointers to full capabilities

This commit is contained in:
westley 2017-03-18 11:38:43 -06:00
parent e98b3dd1a6
commit cfae86e5f1
1 changed files with 3 additions and 3 deletions

View File

@ -27,7 +27,7 @@ exports.DNS_PACKER_TYPE_SOA = function (ab, dv, total, record) {
}
if(!record.ret){
throw new Error("no serial number for SOA record");
}
}
if(!record.ex){
throw new Error("no serial number for SOA record");
}
@ -35,7 +35,7 @@ exports.DNS_PACKER_TYPE_SOA = function (ab, dv, total, record) {
throw new Error("no serial number for SOA record");
}
var soaLen = 20; // take into account sn, ref, ret, ex, and nx
var soaLen = 20; // take into account sn, ref, ret, ex, and nx
// (32-bits each. 4Bytes * 5 = 20)
var rdLenIndex = total;
total += 2; // Save space for RDLENGTH
@ -72,7 +72,7 @@ exports.DNS_PACKER_TYPE_SOA = function (ab, dv, total, record) {
dv.setUint32(total, parseInt(record.ref, 10), false);
total+=4;
dv.setUint32(total, parseInt(record.ret, 10), false);
total+=4;
total+=4;
dv.setUint32(total, parseInt(record.ex, 10), false);
total+=4;
dv.setUint32(total, parseInt(record.nx, 10), false);