From: Miaohe Lin Date: Thu, 6 Aug 2020 11:57:18 +0000 (+0800) Subject: net: Use helper function ip_is_fragment() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=11f920d2aa9d4c2c2d53ccd79f4b5512f2169623;p=linux.git net: Use helper function ip_is_fragment() Use helper function ip_is_fragment() to check ip fragment. Signed-off-by: Miaohe Lin Signed-off-by: David S. Miller --- diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 2828f6d5ba898..7e2e502ef5198 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -4853,7 +4853,7 @@ static int skb_checksum_setup_ipv4(struct sk_buff *skb, bool recalculate) if (err < 0) goto out; - if (ip_hdr(skb)->frag_off & htons(IP_OFFSET | IP_MF)) + if (ip_is_fragment(ip_hdr(skb))) fragment = true; off = ip_hdrlen(skb);