Skip to content

Commit

Permalink
myri10ge: check fragmentation in LRO get_frag_header()
Browse files Browse the repository at this point in the history
Add a fragmentation check to myri10ge's LRO get_frag_header() callback.

Signed-off-by: Brice Goglin <brice@myri.com>
Signed-off-by: Andrew Gallatin <gallatin@myri.com> 
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Brice Goglin authored and David S. Miller committed Dec 9, 2008
1 parent 6cf1a0f commit bcb09dc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/net/myri10ge/myri10ge.c
Original file line number Diff line number Diff line change
Expand Up @@ -2229,6 +2229,8 @@ myri10ge_get_frag_header(struct skb_frag_struct *frag, void **mac_hdr,
*ip_hdr = iph;
if (iph->protocol != IPPROTO_TCP)
return -1;
if (iph->frag_off & htons(IP_MF | IP_OFFSET))
return -1;
*hdr_flags |= LRO_TCP;
*tcpudp_hdr = (u8 *) (*ip_hdr) + (iph->ihl << 2);

Expand Down

0 comments on commit bcb09dc

Please sign in to comment.