summaryrefslogtreecommitdiff
path: root/net/mptcp/pm.c
diff options
context:
space:
mode:
authorKishen Maloor <kishen.maloor@intel.com>2022-05-03 19:38:49 -0700
committerDavid S. Miller <davem@davemloft.net>2022-05-04 10:49:31 +0100
commit4638de5aefe56366726e5107a9da13ce5c84a1b7 (patch)
treeb2b1d98baa25be0b299aeed76932598b2b9a9e0f /net/mptcp/pm.c
parentf43f0cd2d9b07caf38d744701b0b54d4244da8cc (diff)
mptcp: handle local addrs announced by userspace PMs
This change adds an internal function to store/retrieve local addrs announced by userspace PM implementations to/from its kernel context. The function addresses the requirements of three scenarios: 1) ADD_ADDR announcements (which require that a local id be provided), 2) retrieving the local id associated with an address, and also where one may need to be assigned, and 3) reissuance of ADD_ADDRs when there's a successful match of addr/id. The list of all stored local addr entries is held under the MPTCP sock structure. Memory for these entries is allocated from the sock option buffer, so the list of addrs is bounded by optmem_max. The list if not released via REMOVE_ADDR signals is ultimately freed when the sock is destructed. 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: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/mptcp/pm.c')
-rw-r--r--net/mptcp/pm.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/mptcp/pm.c b/net/mptcp/pm.c
index 5d6832c4d9f2..cdc2d79071f8 100644
--- a/net/mptcp/pm.c
+++ b/net/mptcp/pm.c
@@ -469,6 +469,7 @@ void mptcp_pm_data_init(struct mptcp_sock *msk)
{
spin_lock_init(&msk->pm.lock);
INIT_LIST_HEAD(&msk->pm.anno_list);
+ INIT_LIST_HEAD(&msk->pm.userspace_pm_local_addr_list);
mptcp_pm_data_reset(msk);
}