From: Peter Tyser Date: Mon, 1 Dec 2008 22:26:21 +0000 (-0600) Subject: net: Add additional IP fragmentation check X-Git-Tag: v2009.01-rc1~29^2~1 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=d32c5be50bf0600bfdc54223ef341ee9c63db445;p=u-boot net: Add additional IP fragmentation check Ignore IP packets which have the "more fragments" flag bit set. This flag indicates the IP packet is fragmented and must be ignored by U-Boot. Signed-off-by: Peter Tyser Signed-off-by: Ben Warren --- diff --git a/net/net.c b/net/net.c index cf1f4fa1f2..7354f2c14f 100644 --- a/net/net.c +++ b/net/net.c @@ -1399,7 +1399,8 @@ NetReceive(volatile uchar * inpkt, int len) if ((ip->ip_hl_v & 0xf0) != 0x40) { return; } - if (ip->ip_off & htons(IP_OFFS)) { /* Can't deal w/ fragments */ + /* Can't deal with fragments */ + if (ip->ip_off & htons(IP_OFFS | IP_FLAGS_MFRAG)) { return; } /* can't deal with headers > 20 bytes */