Skip to content

Commit

Permalink
ipv4: Don't pass IP fragments to upper layer GRO handlers.
Browse files Browse the repository at this point in the history
Upper layer GRO handlers can not handle IP fragments, so
exit GRO processing in this case.

This fixes ESP GRO because the packet must be reassembled
before we can decapsulate, otherwise we get authentication
failures.

It also aligns IPv4 to IPv6 where packets with fragmentation
headers are not passed to upper layer GRO handlers.

Fixes: 7785bba ("esp: Add a software GRO codepath")
Signed-off-by: Steffen Klassert <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
klassert authored and davem330 committed Apr 28, 2017
1 parent 504926d commit 9b83e03
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions net/ipv4/af_inet.c
Original file line number Diff line number Diff line change
Expand Up @@ -1343,6 +1343,9 @@ struct sk_buff **inet_gro_receive(struct sk_buff **head, struct sk_buff *skb)
if (*(u8 *)iph != 0x45)
goto out_unlock;

if (ip_is_fragment(iph))
goto out_unlock;

if (unlikely(ip_fast_csum((u8 *)iph, 5)))
goto out_unlock;

Expand Down

0 comments on commit 9b83e03

Please sign in to comment.