Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 134355
b: refs/heads/master
c: a5ad24b
h: refs/heads/master
i:
  134353: c2fc2f5
  134351: bcda6ac
v: v3
  • Loading branch information
Herbert Xu authored and David S. Miller committed Feb 9, 2009
1 parent 911c70e commit a9d8932
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: aa4b9f533ed5a22952e038b9fac2447ccc682124
refs/heads/master: a5ad24be728d4352b71a81fba471aa41eb71f83a
13 changes: 7 additions & 6 deletions trunk/net/ipv4/af_inet.c
Original file line number Diff line number Diff line change
Expand Up @@ -1263,7 +1263,7 @@ static struct sk_buff **inet_gro_receive(struct sk_buff **head,
if (!ops || !ops->gro_receive)
goto out_unlock;

if (iph->version != 4 || iph->ihl != 5)
if (*(u8 *)iph != 0x45)
goto out_unlock;

if (unlikely(ip_fast_csum((u8 *)iph, iph->ihl)))
Expand All @@ -1281,17 +1281,18 @@ static struct sk_buff **inet_gro_receive(struct sk_buff **head,

iph2 = ip_hdr(p);

if (iph->protocol != iph2->protocol ||
iph->tos != iph2->tos ||
memcmp(&iph->saddr, &iph2->saddr, 8)) {
if ((iph->protocol ^ iph2->protocol) |
(iph->tos ^ iph2->tos) |
(iph->saddr ^ iph2->saddr) |
(iph->daddr ^ iph2->daddr)) {
NAPI_GRO_CB(p)->same_flow = 0;
continue;
}

/* All fields must match except length and checksum. */
NAPI_GRO_CB(p)->flush |=
memcmp(&iph->frag_off, &iph2->frag_off, 4) ||
(u16)(ntohs(iph2->id) + NAPI_GRO_CB(p)->count) != id;
(iph->ttl ^ iph2->ttl) |
((u16)(ntohs(iph2->id) + NAPI_GRO_CB(p)->count) ^ id);

NAPI_GRO_CB(p)->flush |= flush;
}
Expand Down

0 comments on commit a9d8932

Please sign in to comment.