diff options
author | Wei Yongjun <yjwei@cn.fujitsu.com> | 2008-09-08 00:13:55 -0400 |
---|---|---|
committer | Vlad Yasevich <vladislav.yasevich@hp.com> | 2008-10-01 11:34:16 -0400 |
commit | 8190f89dfd09dae0c117fb0745f5a820bd19a5a4 (patch) | |
tree | 512e10c826ed6f255b8e2cfd951c383528303729 /net/sctp/sm_statefuns.c | |
parent | 536428a9b9a98495f7ea54ad95cad83e22f1d47d (diff) |
sctp: Fix the SNMP counter of SCTP_MIB_OUTOFBLUES
RFC3873 defined SCTP_MIB_OUTOFBLUES:
sctpOutOfBlues OBJECT-TYPE
SYNTAX Counter32
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The number of out of the blue packets received by the host.
An out of the blue packet is an SCTP packet correctly formed,
including the proper checksum, but for which the receiver was
unable to identify an appropriate association."
REFERENCE
"Section 8.4 in RFC2960 deals with the Out-Of-The-Blue
(OOTB) packet definition and procedures."
But OOTB packet INIT, INIT-ACK and SHUTDOWN-ACK(COOKIE-WAIT or
COOKIE-ECHOED state) are not counted by SCTP_MIB_OUTOFBLUES.
Case 1(INIT):
Endpoint A Endpoint B
(CLOSED) (CLOSED)
INIT ---------->
<---------- ABORT
Case 2(INIT-ACK):
Endpoint A Endpoint B
(CLOSED) (CLOSED)
INIT-ACK ---------->
<---------- ABORT
Case 3(SHUTDOWN-ACK):
Endpoint A Endpoint B
(CLOSED) (CLOSED)
<---------- INIT
SHUTDOWN-ACK ---------->
<---------- SHUTDOWN-COMPLETE
Case 4(SHUTDOWN-ACK):
Endpoint A Endpoint B
(CLOSED) (COOKIE-ECHOED)
SHUTDOWN-ACK ---------->
<---------- SHUTDOWN-COMPLETE
This patch fixed the problem.
Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Diffstat (limited to 'net/sctp/sm_statefuns.c')
-rw-r--r-- | net/sctp/sm_statefuns.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c index e57d1d3ad0a6..81dfaee49b71 100644 --- a/net/sctp/sm_statefuns.c +++ b/net/sctp/sm_statefuns.c | |||
@@ -315,8 +315,10 @@ sctp_disposition_t sctp_sf_do_5_1B_init(const struct sctp_endpoint *ep, | |||
315 | /* If the packet is an OOTB packet which is temporarily on the | 315 | /* If the packet is an OOTB packet which is temporarily on the |
316 | * control endpoint, respond with an ABORT. | 316 | * control endpoint, respond with an ABORT. |
317 | */ | 317 | */ |
318 | if (ep == sctp_sk((sctp_get_ctl_sock()))->ep) | 318 | if (ep == sctp_sk((sctp_get_ctl_sock()))->ep) { |
319 | SCTP_INC_STATS(SCTP_MIB_OUTOFBLUES); | ||
319 | return sctp_sf_tabort_8_4_8(ep, asoc, type, arg, commands); | 320 | return sctp_sf_tabort_8_4_8(ep, asoc, type, arg, commands); |
321 | } | ||
320 | 322 | ||
321 | /* 3.1 A packet containing an INIT chunk MUST have a zero Verification | 323 | /* 3.1 A packet containing an INIT chunk MUST have a zero Verification |
322 | * Tag. | 324 | * Tag. |
@@ -635,8 +637,10 @@ sctp_disposition_t sctp_sf_do_5_1D_ce(const struct sctp_endpoint *ep, | |||
635 | /* If the packet is an OOTB packet which is temporarily on the | 637 | /* If the packet is an OOTB packet which is temporarily on the |
636 | * control endpoint, respond with an ABORT. | 638 | * control endpoint, respond with an ABORT. |
637 | */ | 639 | */ |
638 | if (ep == sctp_sk((sctp_get_ctl_sock()))->ep) | 640 | if (ep == sctp_sk((sctp_get_ctl_sock()))->ep) { |
641 | SCTP_INC_STATS(SCTP_MIB_OUTOFBLUES); | ||
639 | return sctp_sf_tabort_8_4_8(ep, asoc, type, arg, commands); | 642 | return sctp_sf_tabort_8_4_8(ep, asoc, type, arg, commands); |
643 | } | ||
640 | 644 | ||
641 | /* Make sure that the COOKIE_ECHO chunk has a valid length. | 645 | /* Make sure that the COOKIE_ECHO chunk has a valid length. |
642 | * In this case, we check that we have enough for at least a | 646 | * In this case, we check that we have enough for at least a |
@@ -3378,6 +3382,8 @@ sctp_disposition_t sctp_sf_do_8_5_1_E_sa(const struct sctp_endpoint *ep, | |||
3378 | * packet and the state function that handles OOTB SHUTDOWN_ACK is | 3382 | * packet and the state function that handles OOTB SHUTDOWN_ACK is |
3379 | * called with a NULL association. | 3383 | * called with a NULL association. |
3380 | */ | 3384 | */ |
3385 | SCTP_INC_STATS(SCTP_MIB_OUTOFBLUES); | ||
3386 | |||
3381 | return sctp_sf_shut_8_4_5(ep, NULL, type, arg, commands); | 3387 | return sctp_sf_shut_8_4_5(ep, NULL, type, arg, commands); |
3382 | } | 3388 | } |
3383 | 3389 | ||