Skip to content

Commit b0a4227

Browse files
MiaoheLindavem330
authored andcommitted
net: udp: Fix wrong clean up for IS_UDPLITE macro
We can't use IS_UDPLITE to replace udp_sk->pcflag when UDPLITE_RECV_CC is checked. Fixes: b2bf1e2 ("[UDP]: Clean up for IS_UDPLITE macro") Signed-off-by: Miaohe Lin <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 9bb5fbe commit b0a4227

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

net/ipv4/udp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2054,7 +2054,7 @@ static int udp_queue_rcv_one_skb(struct sock *sk, struct sk_buff *skb)
20542054
/*
20552055
* UDP-Lite specific tests, ignored on UDP sockets
20562056
*/
2057-
if ((is_udplite & UDPLITE_RECV_CC) && UDP_SKB_CB(skb)->partial_cov) {
2057+
if ((up->pcflag & UDPLITE_RECV_CC) && UDP_SKB_CB(skb)->partial_cov) {
20582058

20592059
/*
20602060
* MIB statistics other than incrementing the error count are

net/ipv6/udp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -646,7 +646,7 @@ static int udpv6_queue_rcv_one_skb(struct sock *sk, struct sk_buff *skb)
646646
/*
647647
* UDP-Lite specific tests, ignored on UDP sockets (see net/ipv4/udp.c).
648648
*/
649-
if ((is_udplite & UDPLITE_RECV_CC) && UDP_SKB_CB(skb)->partial_cov) {
649+
if ((up->pcflag & UDPLITE_RECV_CC) && UDP_SKB_CB(skb)->partial_cov) {
650650

651651
if (up->pcrlen == 0) { /* full coverage was set */
652652
net_dbg_ratelimited("UDPLITE6: partial coverage %d while full coverage %d requested\n",

0 commit comments

Comments
 (0)