Skip to content

Commit bcb09dc

Browse files
Brice Goglindavem330
authored andcommitted
myri10ge: check fragmentation in LRO get_frag_header()
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>
1 parent 6cf1a0f commit bcb09dc

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/net/myri10ge/myri10ge.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2229,6 +2229,8 @@ myri10ge_get_frag_header(struct skb_frag_struct *frag, void **mac_hdr,
22292229
*ip_hdr = iph;
22302230
if (iph->protocol != IPPROTO_TCP)
22312231
return -1;
2232+
if (iph->frag_off & htons(IP_MF | IP_OFFSET))
2233+
return -1;
22322234
*hdr_flags |= LRO_TCP;
22332235
*tcpudp_hdr = (u8 *) (*ip_hdr) + (iph->ihl << 2);
22342236

0 commit comments

Comments
 (0)