-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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 over TCP #386
DNS over TCP #386
Conversation
TODO: Check DNS message validity using the offset variable Do basic tests
parse function almost over TODO : testing parse func
update with master
TODO: Tests must validate and help complete dns.go
TODO: Need to add new tests with multiple packets TCP stream
keeping up with master
TODO: The test raise an error, correct it
TODO: integration test
TODO: Integration test
Merge from master
Can the commit failures be repaired ? |
@McStork this looks really promising! Regarding the integration tests, I think the reason is that the "test" binary is not there. We use a special binary for the tests so we can get line coverage reports. You have two options to create it:
|
@McStork no worries about all the commits. You can rebase and squash at the end. |
@McStork It would make reviewing easier if you do the conversion to use miekg/dns in a separate pull request. So when you are ready, we will review this PR and get it merged in and you can open a second PR for the other changes. I briefly looked over this PR and it looks good. |
merge from master
TODO : make it work
@McStork I was wondering about the state of this PR, because we're planning to do a Github repos reorganization this week. We're merging all the official beats in a single repo. They way we do it is that we'll move the code from the other repos into this one, so this PR will still live. However, because all Packetbeat files will be moved under a packetbeat/ folder, I expect it to result in a lot of merge/rebase conflicts. What do you think, is there any chance we could bring this to a mergeable state quickly and improve on it with future PRs? If not, I'm happy to also help with the rebase work after we do the repos reorg. |
@tsg Well, I don't think I will be able to work on this PR this week. Right now Packetbeat is not top priority on my TODO list (but it will be), as I have a deadline coming very soon on another project. What is left is debuging the TCP decode: the integration test doesn't decode the DNS over TCP packets, as if gopacket doesn't support it. That's what is left to do on this PR. But I can't guarantee you that I will be able to look into it this week :(. |
Thanks for the quick reply. We'll then proceed to do the repositories reorganization and afterwards I'll try to spend some time helping with the review and the rebase to master. In any case, I'd really like to see this through :-) |
Comment all the TCP unit tests that need proper []byte for request and response but fail to decode it for now...
Could solve the issue ... in order to decode the payload of DNS TCP packets, it is needed to skip the first two bytes. So basically there is an offset of 2: The integration test is validated and the live capture seems to work. |
Tests are failing on Travis & Appveyor due to the repo changes we did, you can ignore those until we do the rebase to master. No idea about the 2 bytes, sorry, but looks like you're making great progress. |
Jenkins standing by to test this. If you aren't a maintainer, you can ignore this comment. Someone with commit access, please review this and clear it for Jenkins to run; then say 'jenkins, test it'. |
@McStork The |
@andrewkroh Yup. Thanks, I saw the (yours?) comment at the top of the dns test file. |
@McStork Great to hear you fixed the tests. Can you rebase the PR on master and squash the commits? |
da349f2
to
ff40a61
Compare
How is that ? :/ I'm new to git, plus with the recent changes in this repo, I'm not sure if I ran the good command lines.... but somehow I doubt it. |
It looks like something went wrong with your rebase. I took the liberty of attempting the rebase for you. If you would like, you can do this to pull down my rebased version of your changes and test them to make sure things still work.
From there, the simplest thing to do would be open a new PR and we will just close this one. Another option would be to force push the dns-tcp-rebase branch to your dns branch which would update this PR. |
I will try to open a new PR then. To use your rebase, I ran those:
Will the PR be ok with this forced push ? :/ If I don't force with -f and do just
|
Well the rebase was slightly more complex because I was rebasing on your behalf. But normally you do this (there are many ways to accomplish this task):
|
@andrewkroh Thanks ! |
EARLY REVIEW please
Hi !
This is an attempt at implementing TCP, EDNS, DNSSEC.
For now my code only contains the TCP implementation for the DNS protocol. Once it's done, EDNS and DNSSEC should follow using the miekg/dns library (see #345 ).
I wrote some unit tests but failed at even running the already existing integration tests. I wish someone could help me with that:
Any feedback on the code is welcomed. Thanks.
I also could use some help in order to know how to implement messageParser() and GapInStream(). Should the checks only rely on the decoder ? That's how it's managed for now.