summaryrefslogtreecommitdiff
path: root/net/net.c
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2010-06-23 21:17:29 +0200
committerWolfgang Denk <wd@denx.de>2010-06-23 21:17:29 +0200
commitf35f3968c21bc8d01958ad1f92fe30e6ccc9c318 (patch)
tree2d10d82ec489f225d58b185cf463a4f62ad45ed3 /net/net.c
parent54e19a7ded6e9dbdc3392a57d82f4f77b34e85b8 (diff)
parent482126e27b3dbf0e69a6445da8b94b3551adf05d (diff)
downloadu-boot-imx-f35f3968c21bc8d01958ad1f92fe30e6ccc9c318.zip
u-boot-imx-f35f3968c21bc8d01958ad1f92fe30e6ccc9c318.tar.gz
u-boot-imx-f35f3968c21bc8d01958ad1f92fe30e6ccc9c318.tar.bz2
Merge branch 'master' into next
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 cda7319..33fcd90 100644
--- a/net/net.c
+++ b/net/net.c
@@ -1201,7 +1201,8 @@ static IP_t *__NetDefragment(IP_t *ip, int *lenp)
h = payload + h->next_hole;
}
- if (offset8 + (len / 8) <= h - payload) {
+ /* last fragment may be 1..7 bytes, the "+7" forces acceptance */
+ if (offset8 + ((len + 7) / 8) <= h - payload) {
/* no overlap with holes (dup fragment?) */
return NULL;
}