[PATCH 5/5] net: Use helper function ip_is_fragment()

Subsystems: networking [general], the rest

STALE2223d

2 messages, 2 authors, 2020-08-08 · open the first message on its own page

[PATCH 5/5] net: Use helper function ip_is_fragment()

From: linmiaohe <linmiaohe@huawei.com>
Date: 2020-08-06 20:06:33

From: Miaohe Lin <linmiaohe@huawei.com>

Use helper function ip_is_fragment() to check ip fragment.

Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
---
 net/core/skbuff.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index 8a0c39e4ab0a..fa823405829c 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);
-- 
2.19.1

Re: [PATCH 5/5] net: Use helper function ip_is_fragment()

From: David Miller <davem@davemloft.net>
Date: 2020-08-08 21:25:23

From: linmiaohe <linmiaohe@huawei.com>
Date: Thu, 6 Aug 2020 19:57:18 +0800
From: Miaohe Lin <linmiaohe@huawei.com>

Use helper function ip_is_fragment() to check ip fragment.

Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Applied.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help