zephyr: IPPROTO_RAW wrongly used with AF_PACKET

Describe the bug Zephyr specifies the use of IPPROTO_RAW with AF_PACKET sockets. This is not in line how Linux specifies this. `IPPROTO_RAW´ is specified as sub type for IP frames. [1] Used as EtherType this specifies an old length field type. [2]

To Reproduce Use AF_PACKET socket.

Expected behavior IPPROTO_RAW is not treated as a protocol with AF_PACKET sockets, but with AF_INET/AF_INET6 through a SOCK_RAW socket.

Impact Incompatibility (and maintaining this). overhead when using AF_PACKET.

Logs and console output None.

Environment (please complete the following information):

  • OS: Linux
  • Toolchain: Zephyr SDK
  • Commit SHA: df5318479b914d320f52870c6dfd0420779fc5c0

Additional context None.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 16 (15 by maintainers)

Commits related to this issue

Most upvoted comments

@go2sh I constructed a table above to cover all combinations so that we can agree what would need to happen in different case. Please take a look if it makes sense to you.

Lets agree on the table first and then just implement it in a PR to get this working properly. We probably need to mention this table somewhere in the network documentation and link to that in the migration guide to help user to understand what is going on.