<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/net/mptcp/pm_userspace.c, branch linux-6.4.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.4.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.4.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2023-06-05T14:15:57Z</updated>
<entry>
<title>mptcp: update userspace pm infos</title>
<updated>2023-06-05T14:15:57Z</updated>
<author>
<name>Geliang Tang</name>
</author>
<published>2023-06-05T03:25:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=77e4b94a3de692a09b79945ecac5b8e6b77f10c1'/>
<id>urn:sha1:77e4b94a3de692a09b79945ecac5b8e6b77f10c1</id>
<content type='text'>
Increase pm subflows counter on both server side and client side when
userspace pm creates a new subflow, and decrease the counter when it
closes a subflow.

Increase add_addr_signaled counter in mptcp_nl_cmd_announce() when the
address is announced by userspace PM.

This modification is similar to how the in-kernel PM is updating the
counter: when additional subflows are created/removed.

Fixes: 9ab4807c84a4 ("mptcp: netlink: Add MPTCP_PM_CMD_ANNOUNCE")
Fixes: 702c2f646d42 ("mptcp: netlink: allow userspace-driven subflow establishment")
Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/329
Cc: stable@vger.kernel.org
Reviewed-by: Matthieu Baerts &lt;matthieu.baerts@tessares.net&gt;
Signed-off-by: Geliang Tang &lt;geliang.tang@suse.com&gt;
Signed-off-by: Mat Martineau &lt;martineau@kernel.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>mptcp: add address into userspace pm list</title>
<updated>2023-06-05T14:15:57Z</updated>
<author>
<name>Geliang Tang</name>
</author>
<published>2023-06-05T03:25:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=24430f8bf51655c5ab7ddc2fafe939dd3cd0dd47'/>
<id>urn:sha1:24430f8bf51655c5ab7ddc2fafe939dd3cd0dd47</id>
<content type='text'>
Add the address into userspace_pm_local_addr_list when the subflow is
created. Make sure it can be found in mptcp_nl_cmd_remove(). And delete
it in the new helper mptcp_userspace_pm_delete_local_addr().

By doing this, the "REMOVE" command also works with subflows that have
been created via the "SUB_CREATE" command instead of restricting to
the addresses that have been announced via the "ANNOUNCE" command.

Fixes: d9a4594edabf ("mptcp: netlink: Add MPTCP_PM_CMD_REMOVE")
Link: https://github.com/multipath-tcp/mptcp_net-next/issues/379
Cc: stable@vger.kernel.org
Reviewed-by: Matthieu Baerts &lt;matthieu.baerts@tessares.net&gt;
Signed-off-by: Geliang Tang &lt;geliang.tang@suse.com&gt;
Signed-off-by: Mat Martineau &lt;martineau@kernel.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>mptcp: only send RM_ADDR in nl_cmd_remove</title>
<updated>2023-06-05T14:15:57Z</updated>
<author>
<name>Geliang Tang</name>
</author>
<published>2023-06-05T03:25:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8b1c94da1e481090f24127b2c420b0c0b0421ce3'/>
<id>urn:sha1:8b1c94da1e481090f24127b2c420b0c0b0421ce3</id>
<content type='text'>
The specifications from [1] about the "REMOVE" command say:

    Announce that an address has been lost to the peer

It was then only supposed to send a RM_ADDR and not trying to delete
associated subflows.

A new helper mptcp_pm_remove_addrs() is then introduced to do just
that, compared to mptcp_pm_remove_addrs_and_subflows() also removing
subflows.

To delete a subflow, the userspace daemon can use the "SUB_DESTROY"
command, see mptcp_nl_cmd_sf_destroy().

Fixes: d9a4594edabf ("mptcp: netlink: Add MPTCP_PM_CMD_REMOVE")
Link: https://github.com/multipath-tcp/mptcp/blob/mptcp_v0.96/include/uapi/linux/mptcp.h [1]
Cc: stable@vger.kernel.org
Reviewed-by: Matthieu Baerts &lt;matthieu.baerts@tessares.net&gt;
Signed-off-by: Geliang Tang &lt;geliang.tang@suse.com&gt;
Signed-off-by: Mat Martineau &lt;martineau@kernel.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>mptcp: make userspace_pm_append_new_local_addr static</title>
<updated>2023-04-17T07:25:33Z</updated>
<author>
<name>Geliang Tang</name>
</author>
<published>2023-04-14T15:47:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=aa5887dca2d236fc50000e27023d4d78dce3af30'/>
<id>urn:sha1:aa5887dca2d236fc50000e27023d4d78dce3af30</id>
<content type='text'>
mptcp_userspace_pm_append_new_local_addr() has always exclusively been
used in pm_userspace.c since its introduction in
commit 4638de5aefe5 ("mptcp: handle local addrs announced by userspace PMs").

So make it static.

Signed-off-by: Geliang Tang &lt;geliang.tang@suse.com&gt;
Reviewed-by: Matthieu Baerts &lt;matthieu.baerts@tessares.net&gt;
Signed-off-by: Matthieu Baerts &lt;matthieu.baerts@tessares.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>mptcp: userspace pm: use a single point of exit</title>
<updated>2023-01-26T12:33:30Z</updated>
<author>
<name>Matthieu Baerts</name>
</author>
<published>2023-01-25T10:47:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=40c71f763f87b68fe43199c1702220c91afed288'/>
<id>urn:sha1:40c71f763f87b68fe43199c1702220c91afed288</id>
<content type='text'>
Like in all other functions in this file, a single point of exit is used
when extra operations are needed: unlock, decrement refcount, etc.

There is no functional change for the moment but it is better to do the
same here to make sure all cleanups are done in case of intermediate
errors.

Reviewed-by: Mat Martineau &lt;mathew.j.martineau@linux.intel.com&gt;
Signed-off-by: Matthieu Baerts &lt;matthieu.baerts@tessares.net&gt;
Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;
</content>
</entry>
<entry>
<title>mptcp: netlink: respect v4/v6-only sockets</title>
<updated>2023-01-14T05:55:45Z</updated>
<author>
<name>Matthieu Baerts</name>
</author>
<published>2023-01-12T17:42:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fb00ee4f3343acb2b9222ca9b73b47dd1e1a8efc'/>
<id>urn:sha1:fb00ee4f3343acb2b9222ca9b73b47dd1e1a8efc</id>
<content type='text'>
If an MPTCP socket has been created with AF_INET6 and the IPV6_V6ONLY
option has been set, the userspace PM would allow creating subflows
using IPv4 addresses, e.g. mapped in v6.

The kernel side of userspace PM will also accept creating subflows with
local and remote addresses having different families. Depending on the
subflow socket's family, different behaviours are expected:
 - If AF_INET is forced with a v6 address, the kernel will take the last
   byte of the IP and try to connect to that: a new subflow is created
   but to a non expected address.
 - If AF_INET6 is forced with a v4 address, the kernel will try to
   connect to a v4 address (v4-mapped-v6). A -EBADF error from the
   connect() part is then expected.

It is then required to check the given families can be accepted. This is
done by using a new helper for addresses family matching, taking care of
IPv4 vs IPv4-mapped-IPv6 addresses. This helper will be re-used later by
the in-kernel path-manager to use mixed IPv4 and IPv6 addresses.

While at it, a clear error message is now reported if there are some
conflicts with the families that have been passed by the userspace.

Fixes: 702c2f646d42 ("mptcp: netlink: allow userspace-driven subflow establishment")
Cc: stable@vger.kernel.org
Reviewed-by: Mat Martineau &lt;mathew.j.martineau@linux.intel.com&gt;
Signed-off-by: Matthieu Baerts &lt;matthieu.baerts@tessares.net&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net</title>
<updated>2022-12-13T08:49:29Z</updated>
<author>
<name>Paolo Abeni</name>
</author>
<published>2022-12-13T08:24:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b11919e1bb7f6f6273f5a33947b8496da2769eb8'/>
<id>urn:sha1:b11919e1bb7f6f6273f5a33947b8496da2769eb8</id>
<content type='text'>
Merge in the left-over fixes before the net-next pull-request.

net/mptcp/subflow.c
  d3295fee3c75 ("mptcp: use proper req destructor for IPv6")
  36b122baf6a8 ("mptcp: add subflow_v(4,6)_send_synack()")

Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;
</content>
</entry>
<entry>
<title>mptcp: netlink: fix some error return code</title>
<updated>2022-12-12T21:11:23Z</updated>
<author>
<name>Wei Yongjun</name>
</author>
<published>2022-12-10T00:28:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e0fe1123ab2b07d2cd5475660bd0b4e6993ffaa7'/>
<id>urn:sha1:e0fe1123ab2b07d2cd5475660bd0b4e6993ffaa7</id>
<content type='text'>
Fix to return negative error code -EINVAL from some error handling
case instead of 0, as done elsewhere in those functions.

Fixes: 9ab4807c84a4 ("mptcp: netlink: Add MPTCP_PM_CMD_ANNOUNCE")
Fixes: 702c2f646d42 ("mptcp: netlink: allow userspace-driven subflow establishment")
Cc: stable@vger.kernel.org
Reviewed-by: Matthieu Baerts &lt;matthieu.baerts@tessares.net&gt;
Signed-off-by: Wei Yongjun &lt;weiyongjun1@huawei.com&gt;
Signed-off-by: Mat Martineau &lt;mathew.j.martineau@linux.intel.com&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>mptcp: get sk from msk directly</title>
<updated>2022-11-12T05:19:47Z</updated>
<author>
<name>Geliang Tang</name>
</author>
<published>2022-11-10T23:23:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=80638684e840684042325fa5a3fa1eb59fd123cc'/>
<id>urn:sha1:80638684e840684042325fa5a3fa1eb59fd123cc</id>
<content type='text'>
Use '(struct sock *)msk' to get 'sk' from 'msk' in a more direct way
instead of using '&amp;msk-&gt;sk.icsk_inet.sk'.

Reviewed-by: Mat Martineau &lt;mathew.j.martineau@linux.intel.com&gt;
Signed-off-by: Geliang Tang &lt;geliang.tang@suse.com&gt;
Signed-off-by: Mat Martineau &lt;mathew.j.martineau@linux.intel.com&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>mptcp: update MIB_RMSUBFLOW in cmd_sf_destroy</title>
<updated>2022-07-06T11:50:26Z</updated>
<author>
<name>Geliang Tang</name>
</author>
<published>2022-07-05T21:32:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d2d21f175f1f9580eb5681f5b476c8d7a0a3c895'/>
<id>urn:sha1:d2d21f175f1f9580eb5681f5b476c8d7a0a3c895</id>
<content type='text'>
This patch increases MPTCP_MIB_RMSUBFLOW mib counter in userspace pm
destroy subflow function mptcp_nl_cmd_sf_destroy() when removing subflow.

Fixes: 702c2f646d42 ("mptcp: netlink: allow userspace-driven subflow establishment")
Signed-off-by: Geliang Tang &lt;geliang.tang@suse.com&gt;
Signed-off-by: Mat Martineau &lt;mathew.j.martineau@linux.intel.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
