Fix TXT record parser, add NSEC
This commit is contained in:
parent
e8736016bf
commit
5e7f754ab3
|
@ -0,0 +1,18 @@
|
|||
(function (exports) {
|
||||
'use strict';
|
||||
|
||||
exports.DNS_PARSER_TYPE_NSEC = function (ab, packet, record) {
|
||||
|
||||
var rdataAb = ab.slice(record.rdstart,record.rdstart + record.rdlength)
|
||||
var dv = new DataView(rdataAb);
|
||||
|
||||
// !!! Not actually implemented !!!
|
||||
record.priority = 0;
|
||||
record.weight = 0;
|
||||
record.port = 0;
|
||||
record.target = null;
|
||||
|
||||
return record;
|
||||
|
||||
};
|
||||
}('undefined' !== typeof window ? window : exports));
|
|
@ -10,7 +10,7 @@ var unpackLabels = exports.DNS_UNPACK_LABELS || require('../dns.unpack-labels.js
|
|||
exports.DNS_PARSER_TYPE_TXT = function (ab, packet, record) {
|
||||
|
||||
var labels = unpackLabels(new Uint8Array(ab), record.rdstart, { byteLength: 0, cpcount: 0, labels: [], name: '' });
|
||||
record.data = [ labels.name ];
|
||||
record.data = labels.labels;
|
||||
|
||||
return record;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue