netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 5/5] net: Use helper function ip_is_fragment()
@ 2020-08-06 11:57 linmiaohe
  2020-08-08 21:25 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: linmiaohe @ 2020-08-06 11:57 UTC (permalink / raw)
  To: davem, kuba, pshelar, martin.varghese, fw, willemb, edumazet,
	dcaratti, steffen.klassert, pabeni, shmulik, kyk.segfault
  Cc: netdev, linux-kernel, linmiaohe

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 5/5] net: Use helper function ip_is_fragment()
  2020-08-06 11:57 [PATCH 5/5] net: Use helper function ip_is_fragment() linmiaohe
@ 2020-08-08 21:25 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2020-08-08 21:25 UTC (permalink / raw)
  To: linmiaohe
  Cc: kuba, pshelar, martin.varghese, fw, willemb, edumazet, dcaratti,
	steffen.klassert, pabeni, shmulik, kyk.segfault, netdev,
	linux-kernel

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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-08-08 21:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-06 11:57 [PATCH 5/5] net: Use helper function ip_is_fragment() linmiaohe
2020-08-08 21:25 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).