pbufs with len = 0

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

pbufs with len = 0

Hi all,

when trying to fix UDPLite, I came around a flaw in the whole API: I can
send UDP packets without data by giving udp_send() a pbuf with len = 0.
However, if this pbuf is allocated with PBUF_RAW (or a REF type) and UDP
creates a pbuf chain (extra pbuf for the headers), the resulting chain
has len==tot_len (which should be the end of a packet) at the first
element! This leads to an assert in ARP queueing, for example.

If this is not allowed, I think we should check it (using asserts) in
the protocol's send functions!


lwip-devel mailing list
[hidden email]