From: Gao Feng <f...@ikuai8.com> When fail to transmit RST, don't increase TCP_MIB_OUTRSTS in func tcp_send_active_reset like the case that it only increases LINUX_MIB_TCPABORTFAILED when fail to alloc skb.
Signed-off-by: Gao Feng <f...@ikuai8.com> --- net/ipv4/tcp_output.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index 22548b5..274802f 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c @@ -3014,8 +3014,8 @@ void tcp_send_active_reset(struct sock *sk, gfp_t priority) /* Send it off. */ if (tcp_transmit_skb(sk, skb, 0, priority)) NET_INC_STATS(sock_net(sk), LINUX_MIB_TCPABORTFAILED); - - TCP_INC_STATS(sock_net(sk), TCP_MIB_OUTRSTS); + else + TCP_INC_STATS(sock_net(sk), TCP_MIB_OUTRSTS); } /* Send a crossed SYN-ACK during socket establishment. -- 1.9.1