[GH-ISSUE #1362] Ability to mutate Edns options #657

Closed
opened 2026-03-15 23:43:16 +03:00 by kerem · 1 comment
Owner

Originally created by @leshow on GitHub (Jan 20, 2021).
Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/1362

Is your feature request related to a problem? Please describe.
If you want to remove options from options in Edns at the moment, you need to create a new Edns and not add the options you want to remove.

Describe the solution you'd like
We've a modified branch of trust_dns_proto already that adds the remove_option method to Edns and a remove method to OPT. I believe this would satisfy the above situation. If you're alright with all of this I can submit the branch. Edns also provides options and arguably we can provide options_mut also to make the methods symmetric.

Describe alternatives you've considered
As previously stated, the alternative is creating a new Edns and copying over everything except the items you wanted to remove.

options docs

Originally created by @leshow on GitHub (Jan 20, 2021). Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/1362 **Is your feature request related to a problem? Please describe.** If you want to remove options from `options` in `Edns` at the moment, you need to create a new `Edns` and not add the options you want to remove. **Describe the solution you'd like** We've a modified branch of `trust_dns_proto` already that adds the `remove_option` method to `Edns` and a `remove` method to `OPT`. I believe this would satisfy the above situation. If you're alright with all of this I can submit the branch. `Edns` also provides `options` and arguably we can provide `options_mut` also to make the methods symmetric. **Describe alternatives you've considered** As previously stated, the alternative is creating a new `Edns` and copying over everything except the items you wanted to remove. [options docs](https://docs.rs/trust-dns-proto/0.20.0/trust_dns_proto/op/struct.Edns.html#method.option)
kerem closed this issue 2026-03-15 23:43:22 +03:00
Author
Owner

@djc commented on GitHub (Jan 20, 2021):

If you have made changes already, please submit a PR so we can review them directly.

<!-- gh-comment-id:763941748 --> @djc commented on GitHub (Jan 20, 2021): If you have made changes already, please submit a PR so we can review them directly.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hickory-dns#657
No description provided.