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

Lua FFI: Get OPT section function #14567

Closed
wjgauthier opened this issue Aug 20, 2024 · 2 comments · Fixed by #14577
Closed

Lua FFI: Get OPT section function #14567

wjgauthier opened this issue Aug 20, 2024 · 2 comments · Fixed by #14577

Comments

@wjgauthier
Copy link
Contributor

  • Program: dnsdist
  • Issue type: Feature request

Short description

I am using Lua FFI to spoof responses, but I cannot currently handle cases where a client requests an unknown EDNS version (two of the ISC EDNS Compliance checks) because there is no function available to retrieve the OPT section.

Usecase

In my Lua script for spoofing responses, I would like to return BADVERS if the client requests anything other than EDNS version 0, which is the correct way of handling unknown EDNS versions (https://ednscomp.isc.org/).

Description

Implementing an ffi.C.dnsdist_ffi_dnsquestion_get_opt_section function that returns the requested EDNS version (along with other options) would allow me to handle unknown EDNS versions correctly.

@rgacogne
Copy link
Member

I see we already have an accessor for the DNSSEC OK bit (dnsdist_ffi_dnsquestion_get_do) and for EDNS options (dnsdist_ffi_dnsquestion_get_edns_options). There is no other flag defined as far as I know, so I guess we only need new accessors for the version and the extended rcode, or did you have something else in mind?

@wjgauthier
Copy link
Contributor Author

You are right. We would only need accessors for the version and the extended rcode. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants