Closed kyleaedwards closed 7 years ago
a boolean called issuerCritical
I think I'd prefer that. Less work for the user when more flags are added later. But keep the flags number there.
Thanks, landed in https://github.com/mafintosh/dns-packet/commit/c1e94b5d699b11cb531c706e05656b1e060b169a with some additional test in https://github.com/mafintosh/dns-packet/commit/a69aaa10231057304b811ead0a984c58ac67c54a.
Hmm, CI brought up a error that seems specific to node 0.10:
ok 130 decoded object match on external buffer
buffer.js:714
throw TypeError('value is out of bounds');
^
TypeError: value is out of bounds
at TypeError (<anonymous>)
at checkInt (buffer.js:714:11)
at Buffer.writeUInt8 (buffer.js:724:5)
at Object.rcaa.encode (/home/travis/build/mafintosh/dns-packet/index.js:344:7)
at testEncoder (/home/travis/build/mafintosh/dns-packet/test.js:159:20)
at Test.testEncoder.type (/home/travis/build/mafintosh/dns-packet/test.js:51:3)
at Test.bound [as _cb] (/home/travis/build/mafintosh/dns-packet/node_modules/tape/lib/test.js:64:32)
at Test.run (/home/travis/build/mafintosh/dns-packet/node_modules/tape/lib/test.js:83:10)
at Test.bound [as run] (/home/travis/build/mafintosh/dns-packet/node_modules/tape/lib/test.js:64:32)
at Object.next [as _onImmediate] (/home/travis/build/mafintosh/dns-packet/node_modules/tape/lib/results.js:71:15)
Any idea?
Guess we could just initialize data.flags
to 0 to prevent it.
Sorry about that, thanks for the quick fix!
Parsing CAA records according to RFC6844.
Currently there's a flag octet in the packet, but only a bit-0 (128) is being used to denote an "Issuer Critical" status. Since it's only using that one bit, do you have a preference on leaving the integer
flags
property on the decoded data object vs. converting that to a boolean calledissuerCritical
?