]> git.baikalelectronics.ru Git - 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)
committerDavid S. Miller <davem@davemloft.net>
Fri, 7 Jan 2022 11:27:07 +0000 (11:27 +0000)
commitf634e08442aedc1274bde9207fe6ba764b38e5ce
tree031ef9cda951553e31be232f2b0bb8414cb57a5f
parent154fd2bb800aad4dac57eeac9c5f6433f5d1eec4
mptcp: fix per socket endpoint accounting

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: eadd062c09df ("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>
net/mptcp/pm_netlink.c