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

Cleanup getmacbyip and add in4_is* #4386

Merged
merged 2 commits into from
May 24, 2024
Merged

Conversation

gpotter2
Copy link
Member

I think in6_is* functions are cool, and it's sad they have no equivalent for IPv4. It also makes the code more readable as those functions are very well documented.

This PR:

  • adds in4_is* functions that mimic the IPv6 ones in utils.py
  • cleanup getmacbyip. use those functions
  • minor cleanups to utils6.py

@gpotter2 gpotter2 added the cleanup Performs some code clean-up label May 12, 2024
Copy link

codecov bot commented May 12, 2024

Codecov Report

Attention: Patch coverage is 97.14286% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 81.56%. Comparing base (18082f3) to head (044d1b0).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4386      +/-   ##
==========================================
- Coverage   81.56%   81.56%   -0.01%     
==========================================
  Files         352      352              
  Lines       83920    83938      +18     
==========================================
+ Hits        68448    68460      +12     
- Misses      15472    15478       +6     
Files Coverage Δ
scapy/layers/inet6.py 88.46% <100.00%> (+<0.01%) ⬆️
scapy/layers/l2.py 84.32% <100.00%> (ø)
scapy/utils6.py 87.18% <100.00%> (-0.20%) ⬇️
scapy/utils.py 73.12% <96.00%> (+0.26%) ⬆️

... and 5 files with indirect coverage changes

guedou
guedou previously approved these changes May 12, 2024
scapy/utils.py Outdated Show resolved Hide resolved
@guedou
Copy link
Member

guedou commented May 12, 2024

FTR, flake8 complains about an import error

@gpotter2 gpotter2 merged commit d4f5dd9 into secdev:master May 24, 2024
22 of 23 checks passed
@gpotter2 gpotter2 deleted the in4-cleanup branch May 24, 2024 21:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup Performs some code clean-up
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants