提交 01ded9a3 编写于 作者: M Miaohe Lin 提交者: Yang Yingliang

net: udp: Fix wrong clean up for IS_UDPLITE macro

stable inclusion
from linux-4.19.136
commit 9c6d57298e0c9651e333c2f4f2a863c01f12aef7

--------------------------------

[ Upstream commit b0a42277 ]

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

Fixes: b2bf1e26 ("[UDP]: Clean up for IS_UDPLITE macro")
Signed-off-by: NMiaohe Lin <linmiaohe@huawei.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: NLi Aichun <liaichun@huawei.com>
Reviewed-by: Nguodeqing <geffrey.guo@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 097012b8
...@@ -1983,7 +1983,7 @@ static int udp_queue_rcv_skb(struct sock *sk, struct sk_buff *skb) ...@@ -1983,7 +1983,7 @@ static int udp_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
/* /*
* UDP-Lite specific tests, ignored on UDP sockets * 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 * MIB statistics other than incrementing the error count are
......
...@@ -602,7 +602,7 @@ static int udpv6_queue_rcv_skb(struct sock *sk, struct sk_buff *skb) ...@@ -602,7 +602,7 @@ static int udpv6_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
/* /*
* UDP-Lite specific tests, ignored on UDP sockets (see net/ipv4/udp.c). * 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 */ if (up->pcrlen == 0) { /* full coverage was set */
net_dbg_ratelimited("UDPLITE6: partial coverage %d while full coverage %d requested\n", net_dbg_ratelimited("UDPLITE6: partial coverage %d while full coverage %d requested\n",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册