-
-
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
Missing warning when creating a layer 3 socket with iface #4596
Comments
It's normal that there's no warning when using the socket directly. A socket is specific to a single interface. What's the IP destination you're trying to reach? |
Thanks for your answer. I am sending packets to the IPv6 broadcast address.
This is not the expected interface. On the other PC it works and there it shows the correct interface. So I assume that this approach is not reliable for sending messages with broadcast or multicast destinations on particular interfaces? Do I need to use an L2 socket for this use case? |
You are using a multicast address. There usually are multiple routes for the same IP for those addresses. In that case, the behaviour is expected: Scapy can't know which interface to use. Did you read the link you mentioned in your first post ? Scope identifiers are explained there, which are the new 2.6.0 way of doing that. |
Ok, thank you very much. It would have been nice if I got a warning. But if this is intended behavior, I am fine with closing this PR. |
Yeah, sorry for the breaking change. It's documented in the 2.6.0 release notes and on the link you got in the warning https://scapy.readthedocs.io/en/latest/usage.html#multicast |
Brief description
When I do this
I get the warning
SyntaxWarning: 'iface' has no effect on L3 I/O send(). For multicast/link-local see https://scapy.readthedocs.io/en/latest/usage.html#multicast
.Shouldn't I get this warning for this code as well?
I noticed that the behavior changed in scapy 2.6.0. In 2.5.0 I could send the packet this way. In 2.6.0 there is no warning and also no packet in Wireshark. I am not quite sure if this is a Windows 10 vs Windows 11 problem (on PCs with Windows 10 it works). However, it works if I use a l2 socket and prepend the packet with an
Ether()
. A warning in the second case would have saved me some time debugging the problem.Scapy version
2.6.1
Python version
3.9
Operating system
Windows 11
Additional environment information
No response
How to reproduce
see code in description
Actual result
No response
Expected result
No response
Related resources
No response
The text was updated successfully, but these errors were encountered: