Closed bnewbold closed 6 years ago
Non-standard usage should not affect the validity of messages being sent and received. This is a bug. I'll look into it right away.
In case it helps, here's my (straightforward) rust code using resolve
: https://github.com/bnewbold/geniza/blob/master/src/discovery.rs#L19
Ugh. The bug was embarassingly silly:
Internal UDP read buffers were using a maximum size of 512 bytes, which was silently cutting off the end of long UDP packets. I knew 512 was the wrong value for that and I should have fixed it sooner, but never ran into a bug because of it. Of course, it was inevitably going to cause a bug like this.
I've pushed a commit that raises the internal buffer size to 65535 (0xffff
), which is enough to contain any UDP packet. Tests confirm that this resolves the bug.
Thank you for this issue.
Resolving a SRV record that has multiple entries using
resolve
gives me a "ShortMessage" error:Error: failed to resolve record: error decoding message: short message
An example SRV lookup with 6 responses that results in an error: