-
-
Couldn't load subscription status.
- Fork 2.2k
Support for Scope Identifiers in IP addresses for multicast/link-local support #4461
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
Conversation
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
|
/packit build |
|
I'm gonna go ahead and merge this. It worked fine on the BSDs and should avoids issues like #4506 |
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 astrthat has a secretscopeattribute (in order to remember the interface)ifaceattribute of L3 functions. It was already mostly doing nothing, as L3sockets already implement chosing the proper interface when sending. This was confusing.SourceIPFieldandSourceIP6Field. The code path was generally a duplicate since those packets already implement aroute()function.Demo (see doc)
Other changes