From e6d360ff87f005e5b28edc26cb43718244ae7e73 Mon Sep 17 00:00:00 2001 From: Paolo Abeni Date: Fri, 11 Aug 2023 17:57:17 +0200 Subject: 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 Acked-by: Mat Martineau Signed-off-by: Matthieu Baerts Signed-off-by: David S. Miller --- include/net/inet_common.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/net/inet_common.h') 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. */ -- cgit v1.2.3