Experimenting a bit with creating packages using the encode method. The below package returns an error:
_RangeError [ERR_OUT_OFRANGE]: The value of "offset" is out of range. It must be >= 0 and <= 971. Received 1013
Stacktrace:
_at Object.question.decode (C:\sources\lab\node_modules\dns-packet\index.js:1417:31)
at decodeList (C:\sources\lab\node_modules\dns-packet\index.js:1537:19)
at Object.exports.decode (C:\sources\lab\nodemodules\dns-packet\index.js:1477:12)
at IncomingMessage. (C:\sources\lab\buildpacket.js:30:35)
Experimenting a bit with creating packages using the encode method. The below package returns an error: _RangeError [ERR_OUT_OFRANGE]: The value of "offset" is out of range. It must be >= 0 and <= 971. Received 1013
const dnsPacket = require('dns-packet') const buf = dnsPacket.encode({ type: 'query', id: 23751, flags: 256, questions: [ { type: 'A', name: 'google.com' } ] })
Perhaps this is related to the issue here: https://github.com/mafintosh/dns-packet/issues/60
Stacktrace: _at Object.question.decode (C:\sources\lab\node_modules\dns-packet\index.js:1417:31) at decodeList (C:\sources\lab\node_modules\dns-packet\index.js:1537:19) at Object.exports.decode (C:\sources\lab\nodemodules\dns-packet\index.js:1477:12) at IncomingMessage. (C:\sources\lab\buildpacket.js:30:35)