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

Simple way to specify EDNS0 pseudo-header in ldns-testns #222

Open
pemensik opened this issue Jul 12, 2023 · 4 comments
Open

Simple way to specify EDNS0 pseudo-header in ldns-testns #222

pemensik opened this issue Jul 12, 2023 · 4 comments

Comments

@pemensik
Copy link
Contributor

Is there any way to properly include EDNS0 header in responses from ldns-testns? I have tried to hack something up, but that failed.

;SECTION ADDITIONAL
; Hackish specification of ENDS0 OPT response
;.   32768 CLASS1232 OPT
;.   32768 CLASS1232 TYPE41

Because I haven't found a way to print also EDNS0 in dig +unknown format, I am not sure how can I create response including EDNS0. I would like some simple human readable way to do that, at least for EDNS0 buffer size and DO flag.

Is there a simple way to include customized EDNS0 response? Ideally not in such cryptic ways.
Used ldns-1.8.3-6.fc38.x86_64

@wtoorop
Copy link
Member

wtoorop commented Jul 12, 2023

I recently needed this too, and this is how I did it too.

I'll discuss it internally with @gthess and @wcawijngaards , cause testbound (based on ldns-testns) does have some more extensions to this. Maybe we can copy that.

@pemensik
Copy link
Contributor Author

Well the commented out example did not work to me. I am not sure how the TTL part should look like.
I received Syntax error, value expected: . 128 CLASS1232 OPT, but not sure how to fix this.

@wtoorop
Copy link
Member

wtoorop commented Jul 12, 2023

You need to specify empty rdata. I did it like this:

.       32768   CLASS1232       TYPE41  \# 0

@pemensik
Copy link
Contributor Author

Oh, thanks! OPT record type is recognized, but other parts needs to be this non-intuitive way.

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