summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2010-06-22 21:30:05 +0200
committerWolfgang Denk <wd@denx.de>2010-06-22 21:30:05 +0200
commit96b35730a43160afa025ac405961737dbb0682b4 (patch)
treeab8177e5b070d928a408b67546e6f1c714fb5d2e
parent9c00b2f0a3fe0f779761607024f99b7690c9776c (diff)
parent6de27bdc788e7c4532ee0721ae291aeb5df475dc (diff)
Merge branch 'master' of /home/wd/git/u-boot/custodians
-rw-r--r--net/net.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/net.c b/net/net.c
index cda731986b..33fcd90cd4 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;
}