diff options
author | Pavel Emelyanov <xemul@parallels.com> | 2012-02-21 07:30:58 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-02-21 14:58:57 -0500 |
commit | 3f518bf745cbd6007d8069100fb9cb09e960c872 (patch) | |
tree | debbe9e9340d46080f1b82e4149a2427545c4aef /net/ipv4 | |
parent | 4934b0329f7150dcb5f90506860e2db32274c755 (diff) | |
download | blackbird-obmc-linux-3f518bf745cbd6007d8069100fb9cb09e960c872.tar.gz blackbird-obmc-linux-3f518bf745cbd6007d8069100fb9cb09e960c872.zip |
datagram: Add offset argument to __skb_recv_datagram
This one is only considered for MSG_PEEK flag and the value pointed by
it specifies where to start peeking bytes from. If the offset happens to
point into the middle of the returned skb, the offset within this skb is
put back to this very argument.
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/udp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index cd99f1a0f59f..7c41ab84e72e 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c @@ -1167,7 +1167,7 @@ int udp_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, struct sockaddr_in *sin = (struct sockaddr_in *)msg->msg_name; struct sk_buff *skb; unsigned int ulen, copied; - int peeked; + int peeked, off = 0; int err; int is_udplite = IS_UDPLITE(sk); bool slow; @@ -1183,7 +1183,7 @@ int udp_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, try_again: skb = __skb_recv_datagram(sk, flags | (noblock ? MSG_DONTWAIT : 0), - &peeked, &err); + &peeked, &off, &err); if (!skb) goto out; |