-
Notifications
You must be signed in to change notification settings - Fork 2k
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
dns_msg: skip RDLENGTH_LENGTH field when skipping record #20857
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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_msg
skips 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