mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-24 15:42:32 +00:00
net/sock: allow the user to set negative peek offset
This is necessary to allow the user to disable peeking with
offset once it's enabled.
Unix sockets already allow the above, with this patch we
permit it for udp[6] sockets, too.
Fixes: 627d2d6b55
("udp: enable MSG_PEEK at non-zero offset")
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Acked-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
110d8465a6
commit
257a73031d
1 changed files with 0 additions and 3 deletions
|
@ -2454,9 +2454,6 @@ EXPORT_SYMBOL(__sk_mem_reclaim);
|
|||
|
||||
int sk_set_peek_off(struct sock *sk, int val)
|
||||
{
|
||||
if (val < 0)
|
||||
return -EINVAL;
|
||||
|
||||
sk->sk_peek_off = val;
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue