scapy
scapy copied to clipboard
DNS AM: add a bit of defensive programming
This PR adds some checks in the DNS answering machine code that parses the received packets.
Checklist:
- [x] I squashed commits belonging together
- [x] I added unit tests or explained why they are not relevant
- [ ] I executed the regression tests (using
cd test && ./run_testsortox)
fixes #4090
Codecov Report
Attention: Patch coverage is 87.50000% with 3 lines in your changes are missing coverage. Please review.
Project coverage is 82.17%. Comparing base (
01aeed2) to head (32ef3af).
Additional details and impacted files
@@ Coverage Diff @@
## master #4092 +/- ##
=======================================
Coverage 82.17% 82.17%
=======================================
Files 350 350
Lines 83261 83282 +21
=======================================
+ Hits 68419 68441 +22
+ Misses 14842 14841 -1
| Files | Coverage Δ | |
|---|---|---|
| scapy/layers/dns.py | 88.62% <87.50%> (-0.10%) |
:arrow_down: |