]> git.sur5r.net Git - u-boot/commitdiff
net: Add additional IP fragmentation check
authorPeter Tyser <ptyser@xes-inc.com>
Mon, 1 Dec 2008 22:26:21 +0000 (16:26 -0600)
committerBen Warren <biggerbadderben@gmail.com>
Fri, 5 Dec 2008 06:51:54 +0000 (22:51 -0800)
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 <ptyser@xes-inc.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
net/net.c

index cf1f4fa1f294bb30db3885f1afb4dc31da4e1585..7354f2c14f5723a6e2d265be28560d499d78249e 100644 (file)
--- 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 */