From: K. Den Date: Mon, 31 Jul 2017 16:05:20 +0000 (+0900) Subject: vxlan: fix remcsum when GRO on and CHECKSUM_PARTIAL boundary is outer UDP X-Git-Tag: v4.1.12-111.0.20170918_2215~167 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=775c19cbe203ca9e188ab504caf3d008b058ee14;p=users%2Fjedix%2Flinux-maple.git vxlan: fix remcsum when GRO on and CHECKSUM_PARTIAL boundary is outer UDP In the case that GRO is turned on and the original received packet is CHECKSUM_PARTIAL, if the outer UDP header is exactly at the last csum-unnecessary point, which for instance could occur if the packet comes from another Linux guest on the same Linux host, we have to do either remcsum_adjust or set up CHECKSUM_PARTIAL again with its csum_start properly reset considering RCO. However, since b7fe10e5ebac("gro: Fix remcsum offload to deal with frags in GRO") that barrier in such case could be skipped if GRO turned on, hence we pass over it and the inner L4 validation mistakenly reckons it as a bad csum. This patch makes remcsum_offload being reset at the same time of GRO remcsum cleanup, so as to make it work in such case as before. Fixes: b7fe10e5ebac ("gro: Fix remcsum offload to deal with frags in GRO") Signed-off-by: Koichiro Den Signed-off-by: David S. Miller Orabug: 25879842 (cherry picked from commit be73b3043bf465455d4c9b88f68e03b6447bcfb0) Signed-off-by: Cathy Zhou Reviewed-by: Jack Vogel --- diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c index 33530c17f41ed..dcc79652d7750 100644 --- a/drivers/net/vxlan.c +++ b/drivers/net/vxlan.c @@ -632,6 +632,7 @@ static struct sk_buff **vxlan_gro_receive(struct sk_buff **head, out: skb_gro_remcsum_cleanup(skb, &grc); + skb->remcsum_offload = 0; NAPI_GRO_CB(skb)->flush |= flush; return pp;