summaryrefslogtreecommitdiff
path: root/net/dsa
diff options
context:
space:
mode:
authorJason Xing <kernelxing@tencent.com>2024-06-03 20:02:17 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-06-21 15:38:17 +0300
commit3dd41669b300d63bcec53787560929cbcfabf25c (patch)
tree5e78fb9e5af7f3bdb01e4fb3f523e3f2a43a9c04 /net/dsa
parentacdf17546ef8ee73c94e442e3f4b933e42c3dfac (diff)
downloadlinux-3dd41669b300d63bcec53787560929cbcfabf25c.tar.xz
mptcp: count CLOSE-WAIT sockets for MPTCP_MIB_CURRESTAB
[ Upstream commit 9633e9377e6af0244f7381e86b9aac5276f5be97 ] Like previous patch does in TCP, we need to adhere to RFC 1213: "tcpCurrEstab OBJECT-TYPE ... The number of TCP connections for which the current state is either ESTABLISHED or CLOSE- WAIT." So let's consider CLOSE-WAIT sockets. The logic of counting When we increment the counter? a) Only if we change the state to ESTABLISHED. When we decrement the counter? a) if the socket leaves ESTABLISHED and will never go into CLOSE-WAIT, say, on the client side, changing from ESTABLISHED to FIN-WAIT-1. b) if the socket leaves CLOSE-WAIT, say, on the server side, changing from CLOSE-WAIT to LAST-ACK. Fixes: d9cd27b8cd19 ("mptcp: add CurrEstab MIB counter support") Signed-off-by: Jason Xing <kernelxing@tencent.com> Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'net/dsa')
0 files changed, 0 insertions, 0 deletions