summaryrefslogtreecommitdiff
path: root/include/net/inet_common.h
diff options
context:
space:
mode:
authorPaolo Abeni <pabeni@redhat.com>2023-08-11 18:57:17 +0300
committerDavid S. Miller <davem@davemloft.net>2023-08-14 09:06:13 +0300
commite6d360ff87f005e5b28edc26cb43718244ae7e73 (patch)
tree8795fee62cb65d0570b354897af56d46548008cf /include/net/inet_common.h
parentcfb63e50d319ee5d11254c83d3ad2b135b8735db (diff)
downloadlinux-e6d360ff87f005e5b28edc26cb43718244ae7e73.tar.xz
net: factor out inet{,6}_bind_sk helpers
The mptcp protocol maintains an additional socket just to easily invoke a few stream operations on the first subflow. One of them is bind(). Factor out the helpers operating directly on the struct sock, to allow get rid of the above dependency in the next patch without duplicating the existing code. No functional changes intended. Signed-off-by: Paolo Abeni <pabeni@redhat.com> Acked-by: Mat Martineau <martineau@kernel.org> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/inet_common.h')
-rw-r--r--include/net/inet_common.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/net/inet_common.h b/include/net/inet_common.h
index b86b8e21de7f..8e97de700991 100644
--- a/include/net/inet_common.h
+++ b/include/net/inet_common.h
@@ -42,6 +42,7 @@ int inet_shutdown(struct socket *sock, int how);
int inet_listen(struct socket *sock, int backlog);
void inet_sock_destruct(struct sock *sk);
int inet_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len);
+int inet_bind_sk(struct sock *sk, struct sockaddr *uaddr, int addr_len);
/* Don't allocate port at this moment, defer to connect. */
#define BIND_FORCE_ADDRESS_NO_PORT (1 << 0)
/* Grab and release socket lock. */