summaryrefslogtreecommitdiff
path: root/net/ipv4/udp.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2017-08-21 17:06:42 -0700
committerDavid S. Miller <davem@davemloft.net>2017-08-21 17:06:42 -0700
commite2a7c34fb2856fd5306e307e170e3dde358d0dce (patch)
treeafeb300b04186b1a1f649b2cd8a401a75878297c /net/ipv4/udp.c
parent7d3f0cd43feea1636dd7746f22fe8249b34d1b79 (diff)
parent6470812e22261d2342ef1597be62e63a0423d691 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'net/ipv4/udp.c')
-rw-r--r--net/ipv4/udp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index cb633884e825..25fb14490d6a 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -1585,7 +1585,8 @@ int udp_recvmsg(struct sock *sk, struct msghdr *msg, size_t len, int noblock,
return ip_recv_error(sk, msg, len, addr_len);
try_again:
- peeking = off = sk_peek_offset(sk, flags);
+ peeking = flags & MSG_PEEK;
+ off = sk_peek_offset(sk, flags);
skb = __skb_recv_udp(sk, flags, noblock, &peeked, &off, &err);
if (!skb)
return err;