Skip to content

net: ip: Do not use IPPROTO_RAW for AF_PACKET sockets #86885

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

jukkar
Copy link
Member

@jukkar jukkar commented Mar 10, 2025

The AF_PACKET socket protocol field needs to be according to ETH_P_* values (defined in include/net/ethernet.h) and not for IPPROTO_RAW which is only for AF_INET or AF_INET6 family.

Fixes #86827

The AF_PACKET socket protocol field needs to be according to
ETH_P_* values (defined in include/net/ethernet.h) and not
for IPPROTO_RAW which is only for AF_INET or AF_INET6 family.

Fixes zephyrproject-rtos#86827

Signed-off-by: Jukka Rissanen <[email protected]>
@jukkar
Copy link
Member Author

jukkar commented Mar 11, 2025

This PR needs still tweaking. We need first to figure out the correct behavior in different combinations of protocol and address family. See the table in #86827 (comment) for details.

@jukkar
Copy link
Member Author

jukkar commented Apr 2, 2025

Replaced by #88044

@jukkar jukkar closed this Apr 2, 2025
@rlubos
Copy link
Collaborator

rlubos commented Apr 2, 2025

Replaced by #88044

Actually, we still need to drop AF_PACKET/IPPROTO_RAW support, my PR only introduces AF_INET/SOCK_RAW. So we'd either need to update this PR, or create a follow up PR later.

@jukkar jukkar deleted the fix/86827/af_packet-with-ipproto-raw branch April 15, 2025 11:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

IPPROTO_RAW wrongly used with AF_PACKET
3 participants