forked from LittleChest/dns-packet
rename flag_auth,flag_trunc to flag_aa,flag_tc
Fixes: https://github.com/mafintosh/dns-packet/issues/27
This commit is contained in:
parent
44718b2f31
commit
84589e7026
@ -1,3 +1,4 @@
|
||||
# Version 4.0.0 - yyyy-mm-dd
|
||||
|
||||
- Changed the decoded value of TXT records to an array of Buffers. This is to accomodate DNS-SD records which rely on the individual strings record being separated.
|
||||
- Renamed the `flag_trunc` and `flag_auth` to `flag_tc` and `flag_aa` to match the names of these in the dns standards.
|
||||
|
||||
4
index.js
4
index.js
@ -141,8 +141,8 @@ header.decode = function (buf, offset) {
|
||||
flags: flags & 32767,
|
||||
flag_qr: ((flags >> 15) & 0x1) === 1,
|
||||
opcode: opcodes.toString((flags >> 11) & 0xf),
|
||||
flag_auth: ((flags >> 10) & 0x1) === 1,
|
||||
flag_trunc: ((flags >> 9) & 0x1) === 1,
|
||||
flag_aa: ((flags >> 10) & 0x1) === 1,
|
||||
flag_tc: ((flags >> 9) & 0x1) === 1,
|
||||
flag_rd: ((flags >> 8) & 0x1) === 1,
|
||||
flag_ra: ((flags >> 7) & 0x1) === 1,
|
||||
flag_z: ((flags >> 6) & 0x1) === 1,
|
||||
|
||||
6
test.js
6
test.js
@ -234,9 +234,9 @@ tape('rcode', function (t) {
|
||||
const val = packet.decode(buf)
|
||||
t.ok(val.type === 'response', 'decode type')
|
||||
t.ok(val.opcode === 'QUERY', 'decode opcode')
|
||||
t.ok(val.flag_qr === true, 'decode flag_auth')
|
||||
t.ok(val.flag_auth === true, 'decode flag_auth')
|
||||
t.ok(val.flag_trunc === false, 'decode flag_trunc')
|
||||
t.ok(val.flag_qr === true, 'decode flag_qr')
|
||||
t.ok(val.flag_aa === true, 'decode flag_aa')
|
||||
t.ok(val.flag_tc === false, 'decode flag_tc')
|
||||
t.ok(val.flag_rd === false, 'decode flag_rd')
|
||||
t.ok(val.flag_ra === true, 'decode flag_ra')
|
||||
t.ok(val.flag_z === false, 'decode flag_z')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user