Skip to content

DNSServer fix custom code replies #7475

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

Merged
merged 1 commit into from
Dec 14, 2022
Merged

Conversation

vortigont
Copy link
Contributor

custom code reply was sending garbage from a buffer instead of crafted DNS header

@mrengineer7777
Copy link
Collaborator

I agree writing from buffer with sizeof(DNSHeader) in replyWithCustomCode() is a BUG. Not sure what the intent was there.

Checking for null buffer in replyWithIP() is also pointless and should be removed. buffer is not referenced in that function and should never be null when called from processNextRequest().

@vortigont
Copy link
Contributor Author

Checking for null buffer in replyWithIP() is also pointless and should be removed

true!
Seems there could be other improvements also. I'll come up with a refactored PR in addition to this bugfix

custom code reply was sending garbage from a buffer instead of crafted DNS header
@vortigont vortigont force-pushed the dnssrv_ccfix branch 2 times, most recently from 3a259bd to 0aee72a Compare December 11, 2022 18:57
@vortigont
Copy link
Contributor Author

@VojtechBartoska,
this fix is ready for review. Tnx!

@VojtechBartoska VojtechBartoska removed the Resolution: Awaiting response Waiting for response of author label Dec 14, 2022
@VojtechBartoska VojtechBartoska added this to the 2.0.6 milestone Dec 14, 2022
@me-no-dev me-no-dev merged commit 27e6f35 into espressif:master Dec 14, 2022
@vortigont vortigont deleted the dnssrv_ccfix branch December 16, 2022 14:39
Human pushed a commit to Human/arduino-esp32 that referenced this pull request Dec 17, 2022
custom code reply was sending garbage from a buffer instead of crafted DNS header
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

4 participants