NLnetLabs / domain

A DNS library for Rust.
https://nlnetlabs.nl/projects/domain/about/
BSD 3-Clause "New" or "Revised" License
341 stars 57 forks source link

Fix adding of EDNS options. #299

Closed ximon18 closed 4 months ago

ximon18 commented 4 months ago

When adding an EDNS option the existing EDNS OPT record header fields are not preserved.

This PR adds a test showing that and then fixes the issue.

There is also another issue relating to EDNS OPT record handling for cookies for which this branch was originally named but I decided to split that out to a separate PR, so just ignore the confusing branch name.

This PR also contains a minor improvement in ease of construction of the transport options enum as the test does this construction and I found it annoyingly verbose and unwieldy.