All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net: udp: Fix wrong clean up for IS_UDPLITE macro
@ 2020-07-21  9:11 linmiaohe
  2020-07-21 22:42 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: linmiaohe @ 2020-07-21  9:11 UTC (permalink / raw)
  To: davem, kuznet, yoshfuji, kuba, wangchen, herbert
  Cc: netdev, linux-kernel, linmiaohe

From: Miaohe Lin <linmiaohe@huawei.com>

We can't use IS_UDPLITE to replace udp_sk->pcflag when UDPLITE_RECV_CC is
checked.

Fixes: b2bf1e2659b1 ("[UDP]: Clean up for IS_UDPLITE macro")
Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
---
 net/ipv4/udp.c | 2 +-
 net/ipv6/udp.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index 1b7ebbcae497..c7d61db1fb38 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -2051,7 +2051,7 @@ static int udp_queue_rcv_one_skb(struct sock *sk, struct sk_buff *skb)
 	/*
 	 * 	UDP-Lite specific tests, ignored on UDP sockets
 	 */
-	if ((is_udplite & UDPLITE_RECV_CC)  &&  UDP_SKB_CB(skb)->partial_cov) {
+	if ((up->pcflag & UDPLITE_RECV_CC)  &&  UDP_SKB_CB(skb)->partial_cov) {
 
 		/*
 		 * MIB statistics other than incrementing the error count are
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c
index 7d4151747340..1164dfe53bb3 100644
--- a/net/ipv6/udp.c
+++ b/net/ipv6/udp.c
@@ -643,7 +643,7 @@ static int udpv6_queue_rcv_one_skb(struct sock *sk, struct sk_buff *skb)
 	/*
 	 * UDP-Lite specific tests, ignored on UDP sockets (see net/ipv4/udp.c).
 	 */
-	if ((is_udplite & UDPLITE_RECV_CC)  &&  UDP_SKB_CB(skb)->partial_cov) {
+	if ((up->pcflag & UDPLITE_RECV_CC)  &&  UDP_SKB_CB(skb)->partial_cov) {
 
 		if (up->pcrlen == 0) {          /* full coverage was set  */
 			net_dbg_ratelimited("UDPLITE6: partial coverage %d while full coverage %d requested\n",
-- 
2.19.1


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

* Re: [PATCH] net: udp: Fix wrong clean up for IS_UDPLITE macro
  2020-07-21  9:11 [PATCH] net: udp: Fix wrong clean up for IS_UDPLITE macro linmiaohe
@ 2020-07-21 22:42 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2020-07-21 22:42 UTC (permalink / raw)
  To: linmiaohe; +Cc: kuznet, yoshfuji, kuba, wangchen, herbert, netdev, linux-kernel

From: linmiaohe <linmiaohe@huawei.com>
Date: Tue, 21 Jul 2020 17:11:44 +0800

> From: Miaohe Lin <linmiaohe@huawei.com>
> 
> We can't use IS_UDPLITE to replace udp_sk->pcflag when UDPLITE_RECV_CC is
> checked.
> 
> Fixes: b2bf1e2659b1 ("[UDP]: Clean up for IS_UDPLITE macro")
> Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>

Applied and queued up for -stable, thanks.

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

end of thread, other threads:[~2020-07-21 22:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-21  9:11 [PATCH] net: udp: Fix wrong clean up for IS_UDPLITE macro linmiaohe
2020-07-21 22:42 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.