Alex,
First and foremost I want to thank you for all of your hard work and contributions to Dnsruby. I rely heavily on Dnsruby for test purposes and you've made my job much easier.
But... recently I found it impossible to use Dnsruby to test a situation where the DNS server was expected to return FORMERR when I send a DNS queries with malformed EDNS client subnet info. It wasn't until I ran tcpdump and saw that Dnsruby was sending the request twice, the second time without the OPT record, that I figured out what going on. Then after perusing the source code in your github repo, I came across the comments in packet_sender.rb that documents this behavior based on Section 5.3 of RFC2671.
Is it possible that this behavior could be changed to an "opt in" basis?
Re-sending the request without the OPT record completely changes the result, which is obviously going to impact anyone that is looking to verify that they receive an actual FORMERR. Maybe it would be possible to control this behavior by adding a new attribute somewhere?
I have currently circumvented the problem by utilizing dig to execute the test, which is possible, because I have a proxy server running between it and the resolver to manipulate the packet in such a way to support each test case (I actually do the same when testing with Dnsruby).
Thanks,
Craig