]> www.infradead.org Git - users/willy/linux.git/commitdiff
net: udp: Fix wrong clean up for IS_UDPLITE macro
authorMiaohe Lin <linmiaohe@huawei.com>
Tue, 21 Jul 2020 09:11:44 +0000 (17:11 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 21 Jul 2020 22:41:49 +0000 (15:41 -0700)
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/udp.c
net/ipv6/udp.c

index 99251d3c70d024aeb1da7d52138425ac85f38a14..4077d589b72efe4849dc83ce786558f5cbef3816 100644 (file)
@@ -2054,7 +2054,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
index 9503c87ac0b3965c4b0350a23dbe0ef6d9b00f57..a8d74f44056a681ef9057c4c4abb34016120b44f 100644 (file)
@@ -646,7 +646,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",