- Fixed typo with Buffer.readUint8 vs readUInt8 that is incompatible with older js
- Removed usage of Object.entries and replaced with for (key in obj)
This commit fix current QU bit implementation that may be used in mDNS
protocol. Indeed, until now, if a packet with QU bit set is received,
it is decoded as:
{
...
questions: [
{
name: '...',
type: 'PTR',
class: 'UNKNOWN_32769'
},
{
name: '...',
type: 'PTR',
class: 'UNKNOWN_32769'
}
],
...
}
Instead of :
{
...
questions: [
{
name: '...',
type: 'PTR',
class: 'IN'
},
{
name: '...',
type: 'PTR',
class: 'IN'
}
],
...
}
This commit adds a proper QU bit support via the qu_bit field.
It enables:
- The encoder to parse properly both the class and the QU bit
- THe decoder to encode a DNS packet with the QU bit set
RFC 4034 specifies the presentation format of the DNSKEY public key,
RRSIG signature, and DS digest fields (base64, base64, and hexadecimal).
With this change, when fields are represented as such, the package will
use the corresponding encoding.
* Add SSHFP record support
Use offset since we may receive a full dns packet
Account for maximum hash lengths for each hash type
fix: don't use the output of `Buffer#copy()`, instead use `Buffer#byteLength`
fix: normalize fingerprint string
fix: the offset pointer starts out at RDLENGTH
fix: account for the `RDLENGTH` field in `rsshfp.decode()`
* tests: add test for the SSHFP record type
* Add tests for name decoding corner cases
* Modify name.decode to throw an error in the following cases:
* Not enough data for reading the full label
* The label is too long (over 253 characters when dots are included)
* A label must be either <= 63 bytes or a pointer
* Pointers can only point to prior data (see RFC 1035, section 4.1.4)
In addition pointer jumps don't add extra dots in the names anymore.
* Make name_decoding tests more specific
* Make name.decode non-recursive
* Ensure name.decode can read the label header
* Fix name.decode error messages
* Add ECS processing. See #46
* Add support for Padding. Simplify ECS to not do CIDR parsing.
* Done implementing the EDNS0 options that make sense
* Default to string values from IANA for EDNSO option codes. Add tests for mappings.
* Add a few more aliases for option codes
* Update README for EDNS0 options
* I think this is what is desired. Happy to change it more if you want.
* Address code review comments from @silverwind
* Add support for DNSSEC types from RFC4034
* Fix bug with wrong signature length decoded
* Sort RRTypes in the Readme, and add new ones
* Add support for nsec3
* Add EDNS(0) OPT RR for UDP payload size in query.
* Rework PR #34, fixes#36. Add support for options in an OPT pseudo-RR.
* Include tweaks from @silverwind
* fix: txt data is an array of strings
* fix: a consistent API for TXT data
* docs: update TXT info
* feat: empty buffer is not allowed
* fix: allow empty strings and buffers
* fix: rnull is like old rtxt
* add ns record and soa record
* npm test with standard
* Complete SOA, NS decoding. Also add encoding and tests.
* updated travis CI tests to stable versions of node.