Skip to content

net: connection: Packet sockets cause packets to drop #93245

@ClaCodes

Description

@ClaCodes

Describe the bug

If CONFIG_NET_SOCKETS_PACKET is selected and a socket of type AF_PACKET and SOCK_RAW is open, then it consumes all packets without giving them a chances to be handled by L2. This includes all packets that should not be consumed in that why like arp, icmp, lldp, ... etc.

Regression

  • This is a regression.

Steps to reproduce

(Seen based on code analysis).
Probably:

  • CONFIG_NET_SOCKETS_PACKET=y
  • open connection of type AF_PACKET/SOCK_RAW
  • packets no longer reach handlers registered using ETH_NET_L3_REGISTER (arp, lldp, ...)

Relevant log output

Impact

Annoyance – Minor irritation; no significant impact on usability or functionality.

Environment

No response

Additional Context

Fix is probably to unconditionally NET_CONTINUE packets at the time of inputting into connections of type AF_PACKET, `SOCK_RAW``, as the system can not know at that time if the packet is needed elsewhere.

Metadata

Metadata

Assignees

Labels

area: NetworkingbugThe issue is a bug, or the PR is fixing a bugpriority: mediumMedium impact/importance bug

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions