- Notifications
You must be signed in to change notification settings - Fork 8.2k
Description
Describe the bug
I have upgraded a application to zephyr 4.3.0-rc1 and start to see issues with UDP traffic (packet loss) on a STM32H573I-DK board. Packet loss occurs quite randomly.
Activating debug logs packets are dropped with the error message:
net_core: process_data: Unknown IP family packet (0x0)
I bisected and first bad commit is b9968e9. Reverting this commit I no longer see drops due to unknown IP family packet.
Further analysis revealed that the L2 packet headers are not stripped correctly for these packets due to a use-after-free issue: net_pkt_unref is called from net_if_recv_data, so that the packet is already freed but nevertheless net_pkt_set_l2_processed(pkt, true); is called on the already freed packet. The network stack already started to reutilize the net_pkt and as such l2_processed is set on the next packet.
Regression
- This is a regression.
Steps to reproduce
No response
Relevant log output
Impact
Major – Severely degrades functionality; workaround is difficult or unavailable.
Environment
- Board: STM32H573I-DK
- Zephyr SDK 0.17.4
- Zephyr 4.3.0-rc1
Additional Context
No response