]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net: Use helper function ip_is_fragment()
authorMiaohe Lin <linmiaohe@huawei.com>
Thu, 6 Aug 2020 11:57:18 +0000 (19:57 +0800)
committerDavid S. Miller <davem@davemloft.net>
Sat, 8 Aug 2020 21:24:53 +0000 (14:24 -0700)
Use helper function ip_is_fragment() to check ip fragment.

Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/skbuff.c

index 2828f6d5ba898a5e50ccce45589bf1370e474b0f..7e2e502ef51983fadd6956b0fdbf421b0c9aa1a6 100644 (file)
@@ -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);