mbed-os/features
Russ Butler 9620b0fc7f STM32 - fix bug were sockets stop receiving data
The function _eth_arch_low_level_input() is meant to pass data into
LWIP and to prepare the ethernet buffers to receive more data.
If the LWIP heap is empty and the call to pbuf_alloc() in
_eth_arch_low_level_input returns null, the ethernet receive buffers
are not updated to receive data. Because of this the ethernet RX
interrupt will not fire. Since the RX interrupt is the only thing that
triggers a call to _eth_arch_low_level_input(), the receive buffers
will never get cleared, and the device stops receiving data.

To prevent this from happening, this patch ensures that the function
_eth_arch_low_level_input() clears the receive buffers even if a new
pbuf for the data couldn't be allocated.

This issue can be reproduce by running the test
"features-feature_lwip-tests-mbedmicro-net-udp_echo_parallel"
and on the same machine running the below python script to flood the
device with UDP broadcast packets:

MY_IP = #ADD your local IP here
from socket import *
s = socket(AF_INET, SOCK_DGRAM)
s.bind((MY_IP, 1234))
s.setsockopt(SOL_SOCKET, SO_REUSEADDR, 1)
s.setsockopt(SOL_SOCKET, SO_BROADCAST, 1)
for _ in range(1000):
    s.sendto("test data", ('255.255.255.255', 1234))
print("Message sent")
2017-06-12 22:18:04 -05:00
..
FEATURE_BLE Merge pull request #4294 from ARMmbed/feature_cmsis5 2017-06-02 23:44:32 -05:00
FEATURE_COMMON_PAL Fix typo that used 16kB for stack. 2017-06-07 15:36:09 +03:00
FEATURE_LWIP STM32 - fix bug were sockets stop receiving data 2017-06-12 22:18:04 -05:00
FEATURE_UVISOR uVisor: Import uVisor v0.28.1 2017-06-04 14:42:00 +01:00
TESTS/filesystem Merge pull request #3936 from geky/bd-mbr 2017-05-30 13:04:50 -05:00
filesystem Fix doxygen warnings in 'features/filesystem' 2017-06-08 15:48:21 -05:00
frameworks Fixing typos in docs 2017-06-10 15:14:28 +01:00
mbedtls Update mbed TLS to version 2.5.0 2017-05-17 15:42:07 +01:00
nanostack Fix compilation for NCS36510 RF driver. 2017-06-08 13:54:33 +03:00
netsocket Remove doxygen warnings in nsapi 2017-06-05 17:32:46 -05:00
storage/FEATURE_STORAGE Fix config store deprecation warnings 2017-06-05 18:06:10 -05:00
unsupported Issue#4250: Fix USB driver for Kinetis devices 2017-06-02 16:36:23 -05:00