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.
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.