- 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
* First pass at mafintosh/dns-packet#48. No auto-refresh yet, because that's a more invasive change.
* Add a quick note to README to kick off a round of tests.
* remove sudo:false