]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
mptcp: fix per socket endpoint accounting
authorPaolo Abeni <pabeni@redhat.com>
Fri, 7 Jan 2022 00:20:20 +0000 (16:20 -0800)
committerPaolo Pisati <paolo.pisati@canonical.com>
Fri, 28 Jan 2022 09:59:53 +0000 (10:59 +0100)
commitc2d853279a8163f61ea636637f3929887715724c
treeadc54b3e42ca3c169cda85a4dc756bd2ba90d408
parent163ea6e26c90a9328f0c2cca54d8a0792698b64b
mptcp: fix per socket endpoint accounting

BugLink: https://bugs.launchpad.net/bugs/1959376
[ Upstream commit f7d6a237d7422809d458d754016de2844017cb4d ]

Since full-mesh endpoint support, the reception of a single ADD_ADDR
option can cause multiple subflows creation. When such option is
accepted we increment 'add_addr_accepted' by one. When we received
a paired RM_ADDR option, we deleted all the relevant subflows,
decrementing 'add_addr_accepted' by one for each of them.

We have a similar issue for 'local_addr_used'

Fix them moving the pm endpoint accounting outside the subflow
traversal.

Fixes: 1a0d6136c5f0 ("mptcp: local addresses fullmesh")
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
net/mptcp/pm_netlink.c