OSDN Git Service

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)
commitf7d6a237d7422809d458d754016de2844017cb4d
tree031ef9cda951553e31be232f2b0bb8414cb57a5f
parent05be5e273c84f6329b3cac4f5bb7b1fe6eaefd5d
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: 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>
net/mptcp/pm_netlink.c