Skip to content

dns: add EDNS0 Padding option#4959

Open
evverx wants to merge 1 commit intosecdev:masterfrom
evverx:padding
Open

dns: add EDNS0 Padding option#4959
evverx wants to merge 1 commit intosecdev:masterfrom
evverx:padding

Conversation

@evverx
Copy link
Copy Markdown
Contributor

@evverx evverx commented Apr 1, 2026

https://datatracker.ietf.org/doc/html/rfc7830 specifies the EDNS(0) "Padding" option, which allows DNS clients and servers to pad request and response messages by a variable number of octets.

It was cross-checked with TShark

>>> tdecode(Ether()/IP()/UDP()/DNS(ar=[DNSRROPT(rdata=[EDNS0PADDING(padding=b'\x00')])]))
...
            Option: PADDING
                Option Code: PADDING (12)
                Option Length: 1
                Option Data: 00
                Padding: 00

https://datatracker.ietf.org/doc/html/rfc7830 specifies the EDNS(0)
"Padding" option, which allows DNS clients and servers to pad request
and response messages by a variable number of octets.

It was cross-checked with TShark
```
>>> tdecode(Ether()/IP()/UDP()/DNS(ar=[DNSRROPT(rdata=[EDNS0PADDING(padding=b'\x00')])]))
...
            Option: PADDING
                Option Code: PADDING (12)
                Option Length: 1
                Option Data: 00
                Padding: 00
```
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 1, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.30%. Comparing base (f4a2ca4) to head (636c2bd).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4959   +/-   ##
=======================================
  Coverage   80.30%   80.30%           
=======================================
  Files         379      379           
  Lines       93107    93167   +60     
=======================================
+ Hits        74769    74820   +51     
- Misses      18338    18347    +9     
Files with missing lines Coverage Δ
scapy/layers/dns.py 83.67% <100.00%> (+0.05%) ⬆️

... and 5 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant