Skip to content

Commit 9b83e03

Browse files
klassertdavem330
authored andcommitted
ipv4: Don't pass IP fragments to upper layer GRO handlers.
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]>
1 parent 504926d commit 9b83e03

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

net/ipv4/af_inet.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1343,6 +1343,9 @@ struct sk_buff **inet_gro_receive(struct sk_buff **head, struct sk_buff *skb)
13431343
if (*(u8 *)iph != 0x45)
13441344
goto out_unlock;
13451345

1346+
if (ip_is_fragment(iph))
1347+
goto out_unlock;
1348+
13461349
if (unlikely(ip_fast_csum((u8 *)iph, 5)))
13471350
goto out_unlock;
13481351

0 commit comments

Comments
 (0)