net: factor out inet{,6}_bind_sk helpers
authorPaolo Abeni <pabeni@redhat.com>
Fri, 11 Aug 2023 15:57:17 +0000 (17:57 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 14 Aug 2023 06:06:13 +0000 (07:06 +0100)
commite6d360ff87f005e5b28edc26cb43718244ae7e73
tree8795fee62cb65d0570b354897af56d46548008cf
parentcfb63e50d319ee5d11254c83d3ad2b135b8735db
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>
include/net/inet_common.h
include/net/ipv6.h
net/ipv4/af_inet.c
net/ipv6/af_inet6.c