@@ -415,6 +415,7 @@ int mptcp_pm_get_local_id(struct mptcp_sock *msk, struct sock_common *skc)
{
struct mptcp_pm_addr_entry skc_local;
struct mptcp_addr_info msk_local;
+ struct mptcp_pm_param param;
if (WARN_ON_ONCE(!msk))
return -1;
@@ -432,9 +433,10 @@ int mptcp_pm_get_local_id(struct mptcp_sock *msk, struct sock_common *skc)
skc_local.addr.id = 0;
skc_local.flags = MPTCP_PM_ADDR_FLAG_IMPLICIT;
+ mptcp_pm_param_set_contexts(¶m, &skc_local, NULL);
if (mptcp_pm_is_userspace(msk))
- return mptcp_userspace_pm_get_local_id(msk, &skc_local);
- return mptcp_pm_nl_get_local_id(msk, &skc_local);
+ return mptcp_userspace_pm_get_local_id(msk, ¶m);
+ return mptcp_pm_nl_get_local_id(msk, ¶m);
}
bool mptcp_pm_is_backup(struct mptcp_sock *msk, struct sock_common *skc)
@@ -1140,8 +1140,9 @@ static int mptcp_pm_nl_create_listen_socket(struct sock *sk,
}
int mptcp_pm_nl_get_local_id(struct mptcp_sock *msk,
- struct mptcp_pm_addr_entry *skc)
+ struct mptcp_pm_param *param)
{
+ struct mptcp_pm_addr_entry *skc = ¶m->entry;
struct mptcp_pm_addr_entry *entry;
struct pm_nl_pernet *pernet;
int ret;
@@ -131,10 +131,11 @@ mptcp_userspace_pm_lookup_addr_by_id(struct mptcp_sock *msk, unsigned int id)
}
int mptcp_userspace_pm_get_local_id(struct mptcp_sock *msk,
- struct mptcp_pm_addr_entry *skc)
+ struct mptcp_pm_param *param)
{
__be16 msk_sport = ((struct inet_sock *)
inet_sk((struct sock *)msk))->inet_sport;
+ struct mptcp_pm_addr_entry *skc = ¶m->entry;
struct mptcp_pm_addr_entry *entry;
spin_lock_bh(&msk->pm.lock);
@@ -1122,9 +1122,9 @@ void mptcp_pm_param_set_contexts(struct mptcp_pm_param *param,
const struct mptcp_addr_info *addr);
int mptcp_pm_get_local_id(struct mptcp_sock *msk, struct sock_common *skc);
int mptcp_pm_nl_get_local_id(struct mptcp_sock *msk,
- struct mptcp_pm_addr_entry *skc);
+ struct mptcp_pm_param *param);
int mptcp_userspace_pm_get_local_id(struct mptcp_sock *msk,
- struct mptcp_pm_addr_entry *skc);
+ struct mptcp_pm_param *param);
bool mptcp_pm_is_backup(struct mptcp_sock *msk, struct sock_common *skc);
bool mptcp_pm_nl_is_backup(struct mptcp_sock *msk, struct mptcp_addr_info *skc);
bool mptcp_userspace_pm_is_backup(struct mptcp_sock *msk, struct mptcp_addr_info *skc);