Skip to content

Commit

Permalink
mptcp: allow ADD_ADDR reissuance by userspace PMs
Browse files Browse the repository at this point in the history
This change allows userspace PM implementations to reissue ADD_ADDR
announcements (if necessary) based on their chosen policy.

Acked-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Kishen Maloor <kishen.maloor@intel.com>
Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Kishen Maloor authored and Jakub Kicinski committed May 3, 2022
1 parent 41b3c69 commit 304ab97
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions net/mptcp/pm_netlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -369,8 +369,16 @@ static bool mptcp_pm_alloc_anno_list(struct mptcp_sock *msk,

lockdep_assert_held(&msk->pm.lock);

if (mptcp_lookup_anno_list_by_saddr(msk, &entry->addr))
return false;
add_entry = mptcp_lookup_anno_list_by_saddr(msk, &entry->addr);

if (add_entry) {
if (mptcp_pm_is_kernel(msk))
return false;

sk_reset_timer(sk, &add_entry->add_timer,
jiffies + mptcp_get_add_addr_timeout(net));
return true;
}

add_entry = kmalloc(sizeof(*add_entry), GFP_ATOMIC);
if (!add_entry)
Expand Down

0 comments on commit 304ab97

Please sign in to comment.