]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - net/core/sock.c
udp: enable MSG_PEEK at non-zero offset
[karo-tx-linux.git] / net / core / sock.c
index e12197b359fdb016ffff853c55e7b999cb9d21b2..2ce76e82857ff9cab856b8dad6d3139a2fdbbcf3 100644 (file)
@@ -2187,6 +2187,15 @@ void __sk_mem_reclaim(struct sock *sk, int amount)
 }
 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;
+}
+EXPORT_SYMBOL_GPL(sk_set_peek_off);
 
 /*
  * Set of default routines for initialising struct proto_ops when