dns_msg: skip RDLENGTH_LENGTH field when skipping record#20857
dns_msg: skip RDLENGTH_LENGTH field when skipping record#20857benpicco merged 5 commits intoRIOT-OS:masterfrom
Conversation
0744a79 to
352c37d
Compare
|
Can you add your test vector to https://github.com/RIOT-OS/RIOT/blob/master/tests/net/gnrc_sock_dns/tests-with-config/01-run.py to prevent future regressions, please? I think just adding the hexdump in a |
|
Ugh I think that test is somewhat broken. All requests after the first --- a/tests/net/gnrc_sock_dns/tests-with-config/01-run.py
+++ b/tests/net/gnrc_sock_dns/tests-with-config/01-run.py
@@ -296,6 +296,7 @@ def testfunc(child):
run(test_success)
run(test_timeout)
+ run(test_success)
run(test_too_short_response)
run(test_qdcount_too_large1)
run(test_qdcount_too_large2)you'll find that the test isn't testing anything at all. (also on |
352c37d to
3c8e44d
Compare
Yeah, I was surprised that there is no dedicated test for |
|
I created It currently only contains positive tests, but could/should be extended with malicious data in the future to better stress the parser. But IMHO that's out of the scope of a bugfix PR. |
|
rebased to to master because of #20860 |
5f5b6c7 to
bc8ce1c
Compare
miri64
left a comment
There was a problem hiding this comment.
IMHO better to use example values in the tests (actual values have the tendency to get stuck, e.g.), other than that, I would ACK.
bc8ce1c to
0bdb8c1
Compare
0bdb8c1 to
b55fdf7
Compare
|
Thank you for addressing and documenting the test vectors! |
Co-Authored-By: Martine Lenders <[email protected]>
b55fdf7 to
0463b27
Compare
|
Fixed a spelling mistake in the name 😅 |
Contribution description
dns_msgskips unknown records, but the length record length field was only added when the record was not skipped - this caused the next record to be started 2 bytes short.Testing procedure
enable DNS with DNS64 server
We can resolve an IPv4 host behind NAT64 now 🎉
Issues/PRs references
fixes #20355