diff options
author | Peter Tyser <ptyser@xes-inc.com> | 2008-12-01 16:26:21 -0600 |
---|---|---|
committer | Ben Warren <biggerbadderben@gmail.com> | 2008-12-04 22:51:54 -0800 |
commit | d32c5be50bf0600bfdc54223ef341ee9c63db445 (patch) | |
tree | 07633a1b8f4d5b889aedae1dfbfa63909d92c2d9 /net | |
parent | e0c07b868cab405ab4b5335a0247899bfc5ea0b6 (diff) | |
download | u-boot-d32c5be50bf0600bfdc54223ef341ee9c63db445.tar.gz u-boot-d32c5be50bf0600bfdc54223ef341ee9c63db445.tar.bz2 u-boot-d32c5be50bf0600bfdc54223ef341ee9c63db445.zip |
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')
-rw-r--r-- | net/net.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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 */ |