kernel_samsung_a53x/net/mptcp
Matthieu Baerts (NGI0) bee789fc2d mptcp: pm: fix backup support in signal endpoints
commit 6834097fc38c5416701c793da94558cea49c0a1f upstream.

There was a support for signal endpoints, but only when the endpoint's
flag was changed during a connection. If an endpoint with the signal and
backup was already present, the MP_JOIN reply was not containing the
backup flag as expected.

That's confusing to have this inconsistent behaviour. On the other hand,
the infrastructure to set the backup flag in the SYN + ACK + MP_JOIN was
already there, it was just never set before. Now when requesting the
local ID from the path-manager, the backup status is also requested.

Note that when the userspace PM is used, the backup flag can be set if
the local address was already used before with a backup flag, e.g. if
the address was announced with the 'backup' flag, or a subflow was
created with the 'backup' flag.

Fixes: 4596a2c1b7f5 ("mptcp: allow creating non-backup subflows")
Cc: stable@vger.kernel.org
Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/507
Reviewed-by: Mat Martineau <martineau@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
[ Conflicts in pm_userspace.c because the context has changed in commit
  1e07938e29c5 ("net: mptcp: rename netlink handlers to
  mptcp_pm_nl_<blah>_{doit,dumpit}") which is not in this version. This
  commit is unrelated to this modification.
  Conflicts in protocol.h because the context has changed in commit
  9ae7846c4b6b ("mptcp: dump addrs in userspace pm list") which is not
  in this version. This commit is unrelated to this modification.
  Conflicts in pm.c because the context has changed in commit
  f40be0db0b76 ("mptcp: unify pm get_flags_and_ifindex_by_id") and
  commit 71b7dec27f34 ("mptcp: less aggressive retransmission strategy")
  which are not in this version. These commits are unrelated to this
  modification.
  Conflicts in subflow.c, because the commit 4cf86ae84c71 ("mptcp:
  strict local address ID selection") is not in this version. It is then
  not needed to modify the subflow_chk_local_id() helper, which is not
  in this version.
  Also, in this version, there is no pm_userspace.c, because this PM has
  been added in v5.19, which also causes conflicts in protocol.h, and
  pm_netlink.c. Plus the code in pm.c can be simplified, as there is no
  userspace PM. And the code in pm_netlink.c needs to use
  addresses_equal() instead of mptcp_addresses_equal(), see commit
  4638de5aefe5 ("mptcp: handle local addrs announced by userspace PMs").
  The code in pm_netlink.c also needs to be adapted because the
  pm_nl_get_pernet_from_msk() helper is not in this version, introduced
  later in commit c682bf536cf4 ("mptcp: add pm_nl_pernet helpers"), and
  also because the 'flags' are in mptcp_addr_info structure, see commit
  daa83ab03954 ("mptcp: move flags and ifindex out of
  mptcp_addr_info"). ]
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>

Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-23 23:20:30 +01:00
..
crypto.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
crypto_test.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ctrl.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
diag.c mptcp: fix possible deadlock in subflow diag 2024-11-18 23:18:30 +01:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mib.c mptcp: mib: count MPJ with backup flag 2024-11-23 23:20:30 +01:00
mib.h mptcp: mib: count MPJ with backup flag 2024-11-23 23:20:30 +01:00
mptcp_diag.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
options.c mptcp: distinguish rcv vs sent backup flag in requests 2024-11-23 23:20:30 +01:00
pm.c mptcp: pm: fix backup support in signal endpoints 2024-11-23 23:20:30 +01:00
pm_netlink.c mptcp: pm: fix backup support in signal endpoints 2024-11-23 23:20:30 +01:00
protocol.c mptcp: sched: check both directions for backup 2024-11-23 23:20:30 +01:00
protocol.h mptcp: pm: fix backup support in signal endpoints 2024-11-23 23:20:30 +01:00
subflow.c mptcp: pm: fix backup support in signal endpoints 2024-11-23 23:20:30 +01:00
syncookies.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
token.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
token_test.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00