]> git.dujemihanovic.xyz Git - linux.git/commit
mptcp: pm: deny endp with signal + subflow + port
authorMatthieu Baerts (NGI0) <matttbe@kernel.org>
Wed, 31 Jul 2024 11:05:54 +0000 (13:05 +0200)
committerJakub Kicinski <kuba@kernel.org>
Fri, 2 Aug 2024 01:24:48 +0000 (18:24 -0700)
commit8af1f11865f259c882cce71d32f85ee9004e2660
tree6143b9e0fe507009ee35c4c78f6848f63401afaf
parentd67c5649c1541dc93f202eeffc6f49220a4ed71d
mptcp: pm: deny endp with signal + subflow + port

As mentioned in the 'Fixes' commit, the port flag is only supported by
the 'signal' flag, and not by the 'subflow' one. Then if both the
'signal' and 'subflow' flags are set, the problem is the same: the
feature cannot work with the 'subflow' flag.

Technically, if both the 'signal' and 'subflow' flags are set, it will
be possible to create the listening socket, but not to establish a
subflow using this source port. So better to explicitly deny it, not to
create some confusions because the expected behaviour is not possible.

Fixes: 09f12c3ab7a5 ("mptcp: allow to use port and non-signal in set_flags")
Cc: stable@vger.kernel.org
Reviewed-by: Mat Martineau <martineau@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://patch.msgid.link/20240731-upstream-net-20240731-mptcp-endp-subflow-signal-v1-2-c8a9b036493b@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/mptcp/pm_netlink.c