-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Support for Scope Identifiers in IP addresses for multicast/link-local support #4461
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #4461 +/- ##
==========================================
+ Coverage 81.42% 81.65% +0.22%
==========================================
Files 355 355
Lines 84815 84880 +65
==========================================
+ Hits 69062 69307 +245
+ Misses 15753 15573 -180
|
38cb410
to
1449b84
Compare
05dfc47
to
d97baad
Compare
guedou
requested changes
Jul 15, 2024
/packit build |
This was referenced Jul 27, 2024
Merged
I'm gonna go ahead and merge this. It worked fine on the BSDs and should avoids issues like #4506 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR does a few changes to how Scapy handles IP addresses, in order to properly support link-layer / multicast scopes on L3. In particular:
The interface is then taken into account when calling
route()
. This enables support for multicast addresses using L3-functions (send, sr, etc.) as it also automatically choses the correct source addresses.ScopedIP
(I'm open to some other name) class/function that returns astr
that has a secretscope
attribute (in order to remember the interface)iface
attribute of L3 functions. It was already mostly doing nothing, as L3sockets already implement chosing the proper interface when sending. This was confusing.SourceIPField
andSourceIP6Field
. The code path was generally a duplicate since those packets already implement aroute()
function.Demo (see doc)
Other changes