Skip to content

net: Additional IP fragmentation check

Peter Tyser u-boot 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2net: Define IP flag field valuesinclude/net.h net/net.c+9 -30 replies
2/2net: Add additional IP fragmentation checknet/net.c+2 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [U-Boot] [PATCH 0/2] net: Additional IP fragmentation check

It looks like U-Boot ignores fragmented IP packets with non-zero "fragment offset" fields, but doesn't ignore the initial fragmented IP packet which has a "fragment offset" field value of 0.

An additional check was added to catch the initial fragmented packet which should have the "more fragments" bit set in its flags field.

The bug initially resulted in TFTP transfers which appeared to work, but in reality failed as some fragmented packets were received, others were not. With these patches applied a TFTP download from a server with a low MTU results in a timeout as U-Boot drops all incominig fragmented TFTP data packets.

I quickly tried the "Add simple IP/UDP fragmentation support" patch in the net/testing repository, but it did not work out of the box. It looks like U-Boot was assembling the fragmented packets correctly based on a memory display of &NetFragBuf, but the assembled packet was not making its way up the stack FWIW.

Peter Tyser (2):
net: Define IP flag field values
net: Add additional IP fragmentation check

 include/net.h |    6 ++++++
 net/net.c     |    8 +++++---
 2 files changed, 11 insertions(+), 3 deletions(-)