mptcp: do not fill info not used by the PM in used
authorMatthieu Baerts <matthieu.baerts@tessares.net>
Mon, 27 Mar 2023 10:22:23 +0000 (12:22 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 29 Mar 2023 08:01:28 +0000 (09:01 +0100)
commite925a0322ada48a3bfdfaf37be46945af3ad6e2e
treef2f3759ecae08b3bee4769d829ce0e132b1c12db
parenta88d0092b24b8cddce57fe0e88e60a9e29e0b515
mptcp: do not fill info not used by the PM in used

Only the in-kernel PM uses the number of address and subflow limits
allowed per connection.

It then makes more sense not to display such info when other PMs are
used not to confuse the userspace by showing limits not being used.

While at it, we can get rid of the "val" variable and add indentations
instead.

It would have been good to have done this modification directly in
commit 4d25247d3ae4 ("mptcp: bypass in-kernel PM restrictions for non-kernel PMs")
but as we change a bit the behaviour, it is fine not to backport it to
stable.

Acked-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/mptcp/sockopt.c