-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
tcpdump support #173
Comments
Fixed by #731. |
There are TODOs still referencing this bug. |
related: #1409 |
Just documenting something i identified trying to get tcpdump working. Our RAW/AF_PACKET sockets are not populating the sockaddr_ll structure correctly, eg Protocol is missing and we don't seem to set the ha_type field correctly as well as Packet Type is always set to PACKET_HOST this needs to be different when we loop outbound packets etc to raw sockets. Today raw/af_packet sockets only see inbound packets and none of the outbound ones (that's another missing feature) Address types
|
Here's the relevant ARP HA type values https://github.com/torvalds/linux/blob/master/include/uapi/linux/if_arp.h#L30 |
In most cases what we want probably is https://github.com/torvalds/linux/blob/master/include/uapi/linux/if_arp.h#L30 to indicate ethernet. |
Also missing is the Protocol field which seems rather complicated to get to because the endpoint.Read() returns a raw buffer.View and the only way to pass protocol back to be populated in sockaddr_ll will require changing Read() to either return a SockAddrLink in addition or change the signature to return something like PacketBuffer which will be significantly more complicated. |
Updates #173 PiperOrigin-RevId: 313305250
Updates #173 PiperOrigin-RevId: 321690756
Updates #173 PiperOrigin-RevId: 313430843
tcpdump now works in gVisor. The following should work tcpdump -i any Promiscuous mode is not yet supported due to some missing features in our AF_PACKET implementation. I am going to close this bug and open a new to add support for promiscuous mode. But that is a lot lower priority. |
Updates #173 PiperOrigin-RevId: 322665518
There are TODOs still referencing this issue:
Search TODO |
Add description for tcpdump support in gvisor. Updates #173
No description provided.
The text was updated successfully, but these errors were encountered: