Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

edns makeDataOpt function needs to assign the code value #1407

Closed
mosajjal opened this issue Jan 5, 2023 · 3 comments
Closed

edns makeDataOpt function needs to assign the code value #1407

mosajjal opened this issue Jan 5, 2023 · 3 comments

Comments

@mosajjal
Copy link
Contributor

mosajjal commented Jan 5, 2023

Just need to confirm this with you first; before working on a potential PR.

in most of EDNS0 comments (like here) you've mentioned e.Code needs to be explicitly set. However, in here none of the codes are present so the packed/unpacked version will always have value 0 for Code.

@miekg
Copy link
Owner

miekg commented Jan 5, 2023

Had to double check, but it's filed in from the wire here: https://github.com/miekg/dns/blob/master/msg_helpers.go#L427

Unsure if it make sense to add a comment to makeDataOpt?

@mosajjal
Copy link
Contributor Author

mosajjal commented Jan 5, 2023

aaah now it makes more sense. thanks for the clarification. you reckon it'll be useful to add a comment here mentioning "it's unpacked from the wire" or just leave it as it is?

@miekg
Copy link
Owner

miekg commented Jan 5, 2023 via email

@miekg miekg closed this as completed Jan 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants