Hi all:
I have a small STM32 microcontroller with little RAM. I mean, I do not
count available memory in Gigabytes or Megabytes, but in Kilobytes. 8-)
I am implementing a very simple protocol based on UDP.
I know that the maximum UDP packet length will be short, according to my
protocol implementation. However, I can send from my PC with 'socat'
huge test UDP packets that cause allocation of several big pbuf objects.
My firmware just discards such big packets upon reception, as they are
obviously invalid according to the protocol. But the firmware cannot
cope well with such big memory allocations, even if short lived. At the
very least, they temporarily exhaust pool memory for other TCP or UDP
connections.
Is there a way to tell lwIP to drop received UDP packets over a certain
size limit, so that it does not try to allocate any RAM for them? I
cannot really prevent that someone on the network suddenly decides to
send big UDP packets to the device. This could be an easy attack vector
(a denial of service security risk).
Thanks in advance,
rdiez
_______________________________________________
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users