aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/udp.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv6/udp.c')
-rw-r--r--net/ipv6/udp.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c
index 36bdcd2e1b52..fa640765385e 100644
--- a/net/ipv6/udp.c
+++ b/net/ipv6/udp.c
@@ -123,6 +123,7 @@ int udpv6_recvmsg(struct kiocb *iocb, struct sock *sk,
123 struct inet_sock *inet = inet_sk(sk); 123 struct inet_sock *inet = inet_sk(sk);
124 struct sk_buff *skb; 124 struct sk_buff *skb;
125 unsigned int ulen, copied; 125 unsigned int ulen, copied;
126 int peeked;
126 int err; 127 int err;
127 int is_udplite = IS_UDPLITE(sk); 128 int is_udplite = IS_UDPLITE(sk);
128 129
@@ -133,7 +134,8 @@ int udpv6_recvmsg(struct kiocb *iocb, struct sock *sk,
133 return ipv6_recv_error(sk, msg, len); 134 return ipv6_recv_error(sk, msg, len);
134 135
135try_again: 136try_again:
136 skb = skb_recv_datagram(sk, flags, noblock, &err); 137 skb = __skb_recv_datagram(sk, flags | (noblock ? MSG_DONTWAIT : 0),
138 &peeked, &err);
137 if (!skb) 139 if (!skb)
138 goto out; 140 goto out;
139 141
@@ -166,7 +168,8 @@ try_again:
166 if (err) 168 if (err)
167 goto out_free; 169 goto out_free;
168 170
169 UDP6_INC_STATS_USER(UDP_MIB_INDATAGRAMS, is_udplite); 171 if (!peeked)
172 UDP6_INC_STATS_USER(UDP_MIB_INDATAGRAMS, is_udplite);
170 173
171 sock_recv_timestamp(msg, sk, skb); 174 sock_recv_timestamp(msg, sk, skb);
172 175