gnrc/ipv6: "invalid payload length" - corrupted IPv6 header when ENABLE_DEBUG=1 in mbox.c #20390
Labels
Area: network
Area: Networking
Area: tests
Area: tests and testing framework
Type: bug
The issue reports a bug / The PR fixes a bug (including spelling errors)
Description
I was actually trying to reproduce a packet leak (hence the unrelated branch name), but I found another race condition when
ENABLE_DEBUG 1
incore/mbox.c
. and data is sent at a certain speed when using gnrc UDP sockets.I wrote a test application to receive UDP datagrams and a python script that sends UDP datagrams.
For reproduction you can find the branch here.
The IPv6 header corruption happens when you send data fast, for example every 100ms.
It does not happen when you send only every 1s.
The datagram size seems unrelated (tested with 1024 and 512).
Steps to reproduce the issue
Terminal1:
Create a SLIP interface on Linux.
cd dist/tools/tunslip
sudo ./tunslip6 -v4 -B 115200 -s /dev/ttyUSB0 fd00:fa:b1:18::1
Terminal 2:
I use
same54-xpro
with a TTL adapter to create a SLIP interface onUART_DEV(1)
.cd tests/net/gnrc_sock_udp_pktbuf
BOARD=same54-xpro make flash term
Terminal 3:
Start the UDP sender
cd tests/net/gnrc_sock_udp_pktbuf/tests
python3 udp_sender.py <ip address of interface on board> 12345
Expected results
RIOT should receive all datagrams without issues.
Actual results
Every second received IPv6 header is corrupted and actually contains the data that was sent.
Consecuquently the packet is dropped because of an invalid length.
Versions
Last RIOT master commit:
270aa7012fab0ceadeb0b82546ea06dbfe9c0902
The text was updated successfully, but these errors were encountered: