ws, remove cruft
This commit is contained in:
parent
a5586f6b2c
commit
6b8a8664f8
|
@ -1,7 +1,6 @@
|
|||
(function (exports) {
|
||||
'use strict';
|
||||
|
||||
|
||||
// NS name for the supplied domain. May be label, pointer or any combination
|
||||
|
||||
exports.DNS_PACKER_TYPE_NS = function (ab, dv, total, record) {
|
||||
|
@ -9,15 +8,12 @@ exports.DNS_PACKER_TYPE_NS = function (ab, dv, total, record) {
|
|||
throw new Error("no data on NS record");
|
||||
}
|
||||
|
||||
|
||||
var nsLen = 0;
|
||||
var rdLenIndex = total;
|
||||
total +=2;
|
||||
|
||||
// RDATA
|
||||
// a sequence of labels
|
||||
record.data.split('.').forEach(function (label) {
|
||||
nsLen += 1 + label.length;
|
||||
|
||||
dv.setUint8(total, label.length, false);
|
||||
total += 1;
|
||||
|
@ -31,7 +27,6 @@ exports.DNS_PACKER_TYPE_NS = function (ab, dv, total, record) {
|
|||
// RDLENGTH
|
||||
dv.setUint16(rdLenIndex, record.data.length + 1, false);
|
||||
|
||||
|
||||
return total;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue