arduino-esp32
arduino-esp32 copied to clipboard
Proper EDNS handling and cleaner NOERROR response in DNSSERVER
Description of Change
Bugs
The code solves two bugs:
-
BUG 1: When trouble shooting a dnsserver with the 'dig' (one of the main DNS troubleshooting tools) the server doesn't answer because it doesn't handle EDNS (OPT records in the additional section).
That has been fixed, the additional section in the query can safely be ignored. (mostly change around line 123)
-
BUG 2: The code also returns an A record when the QUERY Type not 'A' (or 'ANY').
This has been fixed too. For an A and ANY query type the server returns an A record. (mostly change around line 114)
Feature
The code continues to return a 'SERVFAIL' when no match with QNAME occurs. However, with the fix of bug 2 we created a proper 'No Data' response, (RFC2308 2.2) for queries that have a match for the name, but not for the type. The function DNSServer::replyWithNoAnsw implements that functionality.
The server now behaves somewhat more conform the DNS protocl specifications.
(most of the code changes)
Tests scenarios
I tested this code on an ESP32 and WireShark as protocol analyzer - there is no reason to suspect that it does not work on other platforms (to which I have no access).
Related links
| Warnings | |
|---|---|
| :warning: |
Some issues found for the commit messages in this PR:
Please fix these commit messages - here are some basic tips:
|
| :warning: |
The source branch
|
π Hello Kolkman, we appreciate your contribution to this project!
π Please review the project's Contributions Guide for key guidelines on code, documentation, testing, and more.
ποΈ Please also make sure you have read and signed the Contributor License Agreement for this project.
Click to see more instructions ...
This automated output is generated by the PR linter DangerJS, which checks if your Pull Request meets the project's requirements and helps you fix potential issues.
DangerJS is triggered with each push event to a Pull Request and modify the contents of this comment.
Please consider the following:
- Danger mainly focuses on the PR structure and formatting and can't understand the meaning behind your code or changes.
- Danger is not a substitute for human code reviews; it's still important to request a code review from your colleagues.
- Resolve all warnings (β οΈ ) before requesting a review from human reviewers - they will appreciate it.
- To manually retry these Danger checks, please navigate to the Actions tab and re-run last Danger workflow.
Review and merge process you can expect ...
We do welcome contributions in the form of bug reports, feature requests and pull requests.
1. An internal issue has been created for the PR, we assign it to the relevant engineer.
2. They review the PR and either approve it or ask you for changes or clarifications.
3. Once the GitHub PR is approved we do the final review, collect approvals from core owners and make sure all the automated tests are passing.
- At this point we may do some adjustments to the proposed change, or extend it by adding tests or documentation.
4. If the change is approved and passes the tests it is merged into the default branch.
Generated by :no_entry_sign: dangerJS against a28c02b824ff11c353c897000ab1f90f6c0e2b3e
@Kolkman small typo reported by the CI: https://github.com/espressif/arduino-esp32/actions/runs/15443489960/job/43466846177?pr=11411#step:9:29
Test Results
β76 filesβββ76 suitesβββ12m 46s β±οΈ β38 testsββ38 β β0 π€β0 β 241 runsββ241 β β0 π€β0 β
Results for commit a28c02b8.
:recycle: This comment has been updated with latest results.
@Kolkman small typo to fix: https://github.com/espressif/arduino-esp32/actions/runs/15553815702/job/43789936502?pr=11411#step:9:44
Memory usage test (comparing PR against master branch)
The table below shows the summary of memory usage change (decrease - increase) in bytes and percentage for each target.
| Memory | FLASH [bytes] | FLASH [%] | RAM [bytes] | RAM [%] | ||||
|---|---|---|---|---|---|---|---|---|
| Target | DEC | INC | DEC | INC | DEC | INC | DEC | INC |
| ESP32P4 | 0 | :warning: +734 | 0.00 | :warning: +0.10 | 0 | 0 | 0.00 | 0.00 |
| ESP32S3 | 0 | :warning: +812 | 0.00 | :warning: +0.09 | 0 | 0 | 0.00 | 0.00 |
| ESP32S2 | 0 | :warning: +816 | 0.00 | :warning: +0.09 | 0 | 0 | 0.00 | 0.00 |
| ESP32C3 | 0 | :warning: +736 | 0.00 | :warning: +0.08 | 0 | 0 | 0.00 | 0.00 |
| ESP32C6 | 0 | :warning: +740 | 0.00 | :warning: +0.08 | 0 | 0 | 0.00 | 0.00 |
| ESP32 | 0 | :warning: +848 | 0.00 | :warning: +0.09 | 0 | 0 | 0.00 | 0.00 |
Click to expand the detailed deltas report [usage change in BYTES]
| Target | ESP32P4 | ESP32S3 | ESP32S2 | ESP32C3 | ESP32C6 | ESP32 | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Example | FLASH | RAM | FLASH | RAM | FLASH | RAM | FLASH | RAM | FLASH | RAM | FLASH | RAM |
| libraries/DNSServer/examples/CaptivePortal | :warning: +734 | 0 | :warning: +812 | 0 | :warning: +816 | 0 | :warning: +736 | 0 | :warning: +740 | 0 | :warning: +848 | 0 |