mirror of
https://github.com/torvalds/linux.git
synced 2026-05-24 07:03:03 +02:00
mptcp: pm: export mptcp_remote_address
In a following commit, the 'remote_address' helper will need to be used from different files. It is then exported, and prefixed with 'mptcp_', similar to 'mptcp_local_address'. No behavioural changes intended. Reviewed-by: Geliang Tang <geliang@kernel.org> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> Link: https://patch.msgid.link/20250307-net-next-mptcp-pm-reorg-v1-11-abef20ada03b@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
a49eb8ae95
commit
a146731272
|
|
@ -94,8 +94,8 @@ void mptcp_local_address(const struct sock_common *skc, struct mptcp_addr_info *
|
|||
#endif
|
||||
}
|
||||
|
||||
static void remote_address(const struct sock_common *skc,
|
||||
struct mptcp_addr_info *addr)
|
||||
void mptcp_remote_address(const struct sock_common *skc,
|
||||
struct mptcp_addr_info *addr)
|
||||
{
|
||||
addr->family = skc->skc_family;
|
||||
addr->port = skc->skc_dport;
|
||||
|
|
@ -138,7 +138,7 @@ static bool lookup_subflow_by_daddr(const struct list_head *list,
|
|||
(TCPF_ESTABLISHED | TCPF_SYN_SENT | TCPF_SYN_RECV)))
|
||||
continue;
|
||||
|
||||
remote_address((struct sock_common *)ssk, &cur);
|
||||
mptcp_remote_address((struct sock_common *)ssk, &cur);
|
||||
if (mptcp_addresses_equal(&cur, daddr, daddr->port))
|
||||
return true;
|
||||
}
|
||||
|
|
@ -428,7 +428,7 @@ static unsigned int fill_remote_addresses_vec(struct mptcp_sock *msk,
|
|||
int i = 0;
|
||||
|
||||
subflows_max = mptcp_pm_get_subflows_max(msk);
|
||||
remote_address((struct sock_common *)sk, &remote);
|
||||
mptcp_remote_address((struct sock_common *)sk, &remote);
|
||||
|
||||
/* Non-fullmesh endpoint, fill in the single entry
|
||||
* corresponding to the primary MPC subflow remote address
|
||||
|
|
@ -455,7 +455,7 @@ static unsigned int fill_remote_addresses_vec(struct mptcp_sock *msk,
|
|||
|
||||
mptcp_for_each_subflow(msk, subflow) {
|
||||
ssk = mptcp_subflow_tcp_sock(subflow);
|
||||
remote_address((struct sock_common *)ssk, &addrs[i]);
|
||||
mptcp_remote_address((struct sock_common *)ssk, &addrs[i]);
|
||||
addrs[i].id = READ_ONCE(subflow->remote_id);
|
||||
if (deny_id0 && !addrs[i].id)
|
||||
continue;
|
||||
|
|
@ -777,7 +777,7 @@ bool mptcp_pm_is_init_remote_addr(struct mptcp_sock *msk,
|
|||
{
|
||||
struct mptcp_addr_info mpc_remote;
|
||||
|
||||
remote_address((struct sock_common *)msk, &mpc_remote);
|
||||
mptcp_remote_address((struct sock_common *)msk, &mpc_remote);
|
||||
return mptcp_addresses_equal(&mpc_remote, remote, remote->port);
|
||||
}
|
||||
|
||||
|
|
@ -826,7 +826,7 @@ int mptcp_pm_mp_prio_send_ack(struct mptcp_sock *msk,
|
|||
continue;
|
||||
|
||||
if (rem && rem->family != AF_UNSPEC) {
|
||||
remote_address((struct sock_common *)ssk, &remote);
|
||||
mptcp_remote_address((struct sock_common *)ssk, &remote);
|
||||
if (!mptcp_addresses_equal(&remote, rem, rem->port))
|
||||
continue;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -724,7 +724,10 @@ void mptcp_set_state(struct sock *sk, int state);
|
|||
|
||||
bool mptcp_addresses_equal(const struct mptcp_addr_info *a,
|
||||
const struct mptcp_addr_info *b, bool use_port);
|
||||
void mptcp_local_address(const struct sock_common *skc, struct mptcp_addr_info *addr);
|
||||
void mptcp_local_address(const struct sock_common *skc,
|
||||
struct mptcp_addr_info *addr);
|
||||
void mptcp_remote_address(const struct sock_common *skc,
|
||||
struct mptcp_addr_info *addr);
|
||||
|
||||
/* called with sk socket lock held */
|
||||
int __mptcp_subflow_connect(struct sock *sk, const struct mptcp_pm_local *local,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user