瀏覽代碼

Merge branch 'master' of /home/wd/git/u-boot/custodians

Wolfgang Denk 15 年之前
父節點
當前提交
96b35730a4
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      net/net.c

+ 2 - 1
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;
 	}