diff options
Diffstat (limited to 'net/ipv4/udp.c')
-rw-r--r-- | net/ipv4/udp.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index 78cfcb4a1b3f..9ed6393c65d9 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c | |||
@@ -827,6 +827,7 @@ int udp_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, | |||
827 | struct sockaddr_in *sin = (struct sockaddr_in *)msg->msg_name; | 827 | struct sockaddr_in *sin = (struct sockaddr_in *)msg->msg_name; |
828 | struct sk_buff *skb; | 828 | struct sk_buff *skb; |
829 | unsigned int ulen, copied; | 829 | unsigned int ulen, copied; |
830 | int peeked; | ||
830 | int err; | 831 | int err; |
831 | int is_udplite = IS_UDPLITE(sk); | 832 | int is_udplite = IS_UDPLITE(sk); |
832 | 833 | ||
@@ -840,7 +841,8 @@ int udp_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, | |||
840 | return ip_recv_error(sk, msg, len); | 841 | return ip_recv_error(sk, msg, len); |
841 | 842 | ||
842 | try_again: | 843 | try_again: |
843 | skb = skb_recv_datagram(sk, flags, noblock, &err); | 844 | skb = __skb_recv_datagram(sk, flags | (noblock ? MSG_DONTWAIT : 0), |
845 | &peeked, &err); | ||
844 | if (!skb) | 846 | if (!skb) |
845 | goto out; | 847 | goto out; |
846 | 848 | ||
@@ -875,7 +877,8 @@ try_again: | |||
875 | if (err) | 877 | if (err) |
876 | goto out_free; | 878 | goto out_free; |
877 | 879 | ||
878 | UDP_INC_STATS_USER(UDP_MIB_INDATAGRAMS, is_udplite); | 880 | if (!peeked) |
881 | UDP_INC_STATS_USER(UDP_MIB_INDATAGRAMS, is_udplite); | ||
879 | 882 | ||
880 | sock_recv_timestamp(msg, sk, skb); | 883 | sock_recv_timestamp(msg, sk, skb); |
881 | 884 | ||