summaryrefslogtreecommitdiff
path: root/net/net.c
diff options
context:
space:
mode:
authorPeter Tyser <ptyser@xes-inc.com>2008-12-01 16:26:21 -0600
committerBen Warren <biggerbadderben@gmail.com>2008-12-04 22:51:54 -0800
commitd32c5be50bf0600bfdc54223ef341ee9c63db445 (patch)
tree07633a1b8f4d5b889aedae1dfbfa63909d92c2d9 /net/net.c
parente0c07b868cab405ab4b5335a0247899bfc5ea0b6 (diff)
downloadu-boot-imx-d32c5be50bf0600bfdc54223ef341ee9c63db445.zip
u-boot-imx-d32c5be50bf0600bfdc54223ef341ee9c63db445.tar.gz
u-boot-imx-d32c5be50bf0600bfdc54223ef341ee9c63db445.tar.bz2
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 <ptyser@xes-inc.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
Diffstat (limited to 'net/net.c')
-rw-r--r--net/net.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/net.c b/net/net.c
index cf1f4fa..7354f2c 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 */