Skip to content
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

Update inet.py #4227

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Update inet.py #4227

wants to merge 6 commits into from

Conversation

Shu-xueyuan
Copy link

@Shu-xueyuan Shu-xueyuan commented Jan 22, 2024

Fix UDP packet unable to calculate validity when carrying AH extension header

Checklist:

  • If you are new to Scapy: I have checked CONTRIBUTING.md (esp. section submitting-pull-requests)
  • I squashed commits belonging together
  • I added unit tests or explained why they are not relevant
  • I executed the regression tests (using cd test && ./run_tests or tox)
  • If the PR is still not finished, please create a Draft Pull Request

fixes #xxx

Fix UDP packet unable to calculate validity when carrying AH extension header
Copy link

codecov bot commented Jan 22, 2024

Codecov Report

Merging #4227 (45aee45) into master (d71014a) will decrease coverage by 32.48%.
Report is 94 commits behind head on master.
The diff coverage is 0.00%.

Additional details and impacted files
@@             Coverage Diff             @@
##           master    #4227       +/-   ##
===========================================
- Coverage   81.77%   49.29%   -32.48%     
===========================================
  Files         331      343       +12     
  Lines       76721    77435      +714     
===========================================
- Hits        62736    38175    -24561     
- Misses      13985    39260    +25275     
Files Coverage Δ
scapy/layers/inet.py 23.74% <0.00%> (-46.88%) ⬇️

... and 273 files with indirect coverage changes

@guedou
Copy link
Member

guedou commented Jan 30, 2024

@Shu-xueyuan thanks for your PR. Could you share an example that triggers the issue that you are fixing?

@Shu-xueyuan
Copy link
Author

@Shu-xueyuan thanks for your PR. Could you share an example that triggers the issue that you are fixing?

fail pass @guedou I'm very glad that you can reply to me. When I use the official scapy library to construct a UDP message carrying Authentication Header, the Checksum of the message is illegal. Using my modified scapy library to construct the same message will not have this problem. The following is my process of calling scapy: originalPacket = Ether(**ETH2_dicts) / IPv6(**IPV6_dicts) / AH(**Ah_dicts) / UDP(**UDP_dicts).

@Shu-xueyuan
Copy link
Author

@Shu-xueyuan thanks for your PR. Could you share an example that triggers the issue that you are fixing?

@guedou This is the encapsulation format of AH in transport mode:
企业微信截图_17066847603282
Looking forward to your reply.

@gpotter2
Copy link
Member

gpotter2 commented Feb 4, 2024

Hi. This looks good, but you need to add tests in https://github.com/secdev/scapy/blob/master/test/scapy/layers/inet.uts to make sure that this does not regress. Thanks

@Shu-xueyuan Shu-xueyuan reopened this Feb 16, 2024
@Shu-xueyuan
Copy link
Author

@gpotter2 Hello, the test case has been submitted

@gpotter2 gpotter2 added this to the 2.6.0 milestone Mar 22, 2024
@Shu-xueyuan
Copy link
Author

@gpotter2 Hello, when will my changes be reviewed?

@polybassa
Copy link
Contributor

LGTM

polybassa
polybassa previously approved these changes Apr 16, 2024
@polybassa
Copy link
Contributor

Please fix the flake8 issues.

@gpotter2
Copy link
Member

gpotter2 commented Apr 17, 2024

I noted I still need to check when this PR really applies, and compare to what's already implemented in ipsec.py. I will review this more in depth eventually, sorry for the delay. There were some higher priority issues blocking for 2.6.0

@Shu-xueyuan
Copy link
Author

Thanks for your reply, I totally understand. I'll be happy to wait until you have time to review my edits. If there is anything you need further explanation or assistance from me, please feel free to let me know. I fully understand the high-priority issues encountered in version 2.6.0 and hope that the issues can be resolved smoothly. Thanks!

@Shu-xueyuan Shu-xueyuan reopened this Apr 17, 2024
@Shu-xueyuan
Copy link
Author

Please fix the flake8 issues.

@polybassa Thank you for your review, the issue has been resolved.

@gpotter2 gpotter2 removed this from the 2.6.0 milestone Apr 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants