summaryrefslogtreecommitdiffstats
path: root/include/net/sock.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2020-05-28 07:12:09 +0200
committerDavid S. Miller <davem@davemloft.net>2020-05-28 20:11:44 +0200
commitb58f0e8f38c0a44afa59601a115bd231f23471e1 (patch)
tree591622253553216fe2635b360b4f31a62636226b /include/net/sock.h
parentMerge tag 'mlx5-updates-2020-05-26' of git://git.kernel.org/pub/scm/linux/ker... (diff)
downloadlinux-b58f0e8f38c0a44afa59601a115bd231f23471e1.tar.xz
linux-b58f0e8f38c0a44afa59601a115bd231f23471e1.zip
net: add sock_set_reuseaddr
Add a helper to directly set the SO_REUSEADDR sockopt from kernel space without going through a fake uaccess. For this the iscsi target now has to formally depend on inet to avoid a mostly theoretical compile failure. For actual operation it already did depend on having ipv4 or ipv6 support. Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: Sagi Grimberg <sagi@grimberg.me> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/sock.h')
-rw-r--r--include/net/sock.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/net/sock.h b/include/net/sock.h
index 3e8c6d4b4b59..2ec085044790 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -2688,4 +2688,6 @@ static inline bool sk_dev_equal_l3scope(struct sock *sk, int dif)
void sock_def_readable(struct sock *sk);
+void sock_set_reuseaddr(struct sock *sk);
+
#endif /* _SOCK_H */