Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
TODO

Signed-off-by: Geliang Tang <[email protected]>
  • Loading branch information
Geliang Tang committed Jan 3, 2025
1 parent c8c05b9 commit d04545c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
5 changes: 4 additions & 1 deletion net/mptcp/pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -414,8 +414,11 @@ int mptcp_pm_get_local_id(struct mptcp_sock *msk, struct sock_common *skc)
*/
mptcp_local_address((struct sock_common *)msk, &msk_local);
mptcp_local_address((struct sock_common *)skc, &skc_local.addr);
if (mptcp_addresses_equal(&msk_local, &skc_local.addr, false))
if (mptcp_addresses_equal(&msk_local, &skc_local.addr, false)) {
//pr_info("%s msk_local=%u(%pI4) skc_local.addr=%u(%pI4)\n",
// __func__, msk_local.family, &msk_local.addr, skc_local.addr.family, &skc_local.addr.addr);
return 0;
}

skc_local.addr.id = 0;
skc_local.flags = MPTCP_PM_ADDR_FLAG_IMPLICIT;
Expand Down
1 change: 1 addition & 0 deletions net/mptcp/pm_netlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -1138,6 +1138,7 @@ int mptcp_pm_nl_get_local_id(struct mptcp_sock *msk,
struct pm_nl_pernet *pernet;
int ret;

pr_info("%s\n", __func__);
pernet = pm_nl_get_pernet_from_msk(msk);

rcu_read_lock();
Expand Down
2 changes: 2 additions & 0 deletions net/mptcp/pm_userspace.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ static int userspace_pm_get_local_id(struct mptcp_sock *msk,
inet_sk((struct sock *)msk))->inet_sport;
struct mptcp_pm_addr_entry *entry;

pr_info("%s\n", __func__);
spin_lock_bh(&msk->pm.lock);
entry = mptcp_userspace_pm_lookup_addr(msk, &local->addr);
spin_unlock_bh(&msk->pm.lock);
Expand All @@ -157,6 +158,7 @@ static int userspace_pm_get_local_id(struct mptcp_sock *msk,
int mptcp_userspace_pm_get_local_id(struct mptcp_sock *msk,
struct mptcp_pm_addr_entry *local)
{
pr_info("%s\n", __func__);
return msk->pm.ops->get_local_id ?
msk->pm.ops->get_local_id(msk, local) :
userspace_pm_get_local_id(msk, local);
Expand Down

0 comments on commit d04545c

Please sign in to comment.