NLnetLabs / ldns

LDNS is a DNS library that facilitates DNS tool programming
https://nlnetlabs.nl/ldns
BSD 3-Clause "New" or "Revised" License
292 stars 98 forks source link

Rename SVCB echconfig parameter key to ech as per latest RFC draft #165

Closed adam-stoler closed 2 years ago

adam-stoler commented 2 years ago

The latest RFC draft for SVCB and HTTPS records (https://www.ietf.org/archive/id/draft-ietf-dnsop-svcb-https-08.html) renames the "echconfig" parameter key to "ech". This proposed change implements that renaming. For backwards compatibility of text parsing, the "echconfig" parameter name will still be allowed and treated the same as "ech". When outputting as text, the "ech" name will always be used.

This change also fixes an off-by-one error in ldns_rdf2buffer_str_svcparams() that causes it to fail to emit the final parameter for a SVCB record if it was one that does not have a value (such as "no-default-alpn"). For example, a record like this previously failed to emit "key10000" at the end -

svcb-service.nlnetlabs.nl. 3600 IN SVCB 1 test.com. alpn=h2,h3 port=1234 key10000

wtoorop commented 2 years ago

Looks good to me! Thank you for correcting this!

adam-stoler commented 2 years ago

Thank you for merging it in!