Closed pusateri closed 6 years ago
This only adds partial support for the OPT RRTYPE, right? Care to add en/decoding of the attribute/value pairs in the RDATA too? We could use the IANA table to encode them:
https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-11 https://tools.ietf.org/html/rfc6891#page-7
superceded by https://github.com/mafintosh/dns-packet/pull/37.
Thanks for adding options processing to my original work. I was planning on doing it in phases and adding options as I needed them. And sorry for not responding for the past few days. I've been ill and am only now up and about.
This adds support for indicating to the server that the client accepts responses larger than 512 octets over UDP by adding an additional record to the query with the UDP payload size:
The udp field is optional. The size defaults to 4096 if the 'OPT' resource record is present. Currently, the name MUST be specified and it must be '.' (root).
This also fixes a bug with the name encoding length of '.' (root). Previously, it always added 2 to the string length but this is incorrect for the case of root because it is encoded as a single 0x00.
This code does not yet support processing of EDNS(0) options. Those will be added in the future.