Closed keithrbennett closed 9 years ago
...you'll see an exception raised that indicates that line 605 in PacketSender is where the value is being overwritten. I would think that sending a message should not result in any change to the original message at all -- is this wrong? If not, why is this being overwritten?
Leaving aside your first question temporarily…
Yes, I think that you are wrong that sending a message should not result in any change. For example, it may be necessary to add OPT records. Or set DNSSEC bits, depending on the resolver settings.
I have had discussions with Michael Graff about this in the past, as some people do want to send that exact message, and the solution we came up with was Resolver.send_plain_message.
Does that help?
Thanks,
Alex.
I was just writing about that when your message popped in. I'll mention this to the person who found this problem, and I expect that send_plain_message will work just fine. Thanks!
Can we close this now please?
So, given that we have established two mechanisms for your use case :
a) Configure the Resolver to stamp the message with the signature you want b) Use send_plain_message to send exactly the message that you want
can we now close this, please?
Yes, we will probably just call resolver.recurse = false to achieve what we want. Thanks very much.
If message.header.rd is set to false, when the message is sent, the flag is overwritten to true (see test method test_rd_not_overwritten in tc_resolver.rb). The code at my branch at https://github.com/keithrbennett/dnsruby/tree/fix-rd-overwriting illustrates this (1). If you run:
...you'll see an exception raised that indicates that line 605 in PacketSender is where the value is being overwritten. I would think that sending a message should not result in any change to the original message at all -- is this wrong? If not, why is this being overwritten?
Thanks....
(1) To get a copy of this branch, do this: