[TCP]: SNMPv2 tcpAttemptFails counter error
Refer to RFC2012, tcpAttemptFails is defined as following: tcpAttemptFails OBJECT-TYPE SYNTAX Counter32 MAX-ACCESS read-only STATUS current DESCRIPTION "The number of times TCP connections have made a direct transition to the CLOSED state from either the SYN-SENT state or the SYN-RCVD state, plus the number of times TCP connections have made a direct transition to the LISTEN state from the SYN-RCVD state." ::= { tcp 7 } When I lookup into RFC793, I found that the state change should occured under following condition: 1. SYN-SENT -> CLOSED a) Received ACK,RST segment when SYN-SENT state. 2. SYN-RCVD -> CLOSED b) Received SYN segment when SYN-RCVD state(came from LISTEN). c) Received RST segment when SYN-RCVD state(came from SYN-SENT). d) Received SYN segment when SYN-RCVD state(came from SYN-SENT). 3. SYN-RCVD -> LISTEN e) Received RST segment when SYN-RCVD state(came from LISTEN). In my test, those direct state transition can not be counted to tcpAttemptFails. Signed-off-by: Wei Yongjun <yjwei@nanjing-fnst.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
118075b3cd
commit
3687b1dc6f
@@ -427,7 +427,6 @@ static void tcp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
|
||||
case TCP_SYN_RECV: /* Cannot happen.
|
||||
It can, it SYNs are crossed. --ANK */
|
||||
if (!sock_owned_by_user(sk)) {
|
||||
TCP_INC_STATS_BH(TCP_MIB_ATTEMPTFAILS);
|
||||
sk->sk_err = err;
|
||||
sk->sk_error_report(sk); /* Wake people up to see the error (see connect in sock.c) */
|
||||
|
||||
@@ -831,7 +830,6 @@ drop:
|
||||
if (req)
|
||||
reqsk_free(req);
|
||||
|
||||
TCP_INC_STATS_BH(TCP_MIB_ATTEMPTFAILS);
|
||||
return 0; /* don't send reset */
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user