]> git.baikalelectronics.ru Git - kernel.git/commit
mptcp: handle local addrs announced by userspace PMs
authorKishen Maloor <kishen.maloor@intel.com>
Wed, 4 May 2022 02:38:49 +0000 (19:38 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 4 May 2022 09:49:31 +0000 (10:49 +0100)
commitfbf5cdbe665ead3649b7023a73b0e8d1761251de
treeb2b1d98baa25be0b299aeed76932598b2b9a9e0f
parentcbda183fe8c30147599a4d0ce71c68760f1c1776
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>
net/mptcp/Makefile
net/mptcp/pm.c
net/mptcp/pm_netlink.c
net/mptcp/pm_userspace.c [new file with mode: 0644]
net/mptcp/protocol.c
net/mptcp/protocol.h