]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
sctp: Fix SNMP number of SCTP_MIB_ABORTED during violation handling.
authorVlad Yasevich <vladislav.yasevich@hp.com>
Thu, 9 Oct 2008 21:33:01 +0000 (14:33 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 9 Oct 2008 21:33:01 +0000 (14:33 -0700)
If ABORT chunks require authentication and a protocol violation
is triggered, we do not tear down the association.  Subsequently,
we should not increment SCTP_MIB_ABORTED.

Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sctp/sm_statefuns.c

index 1588d063c68ce750f649413553af8253a60c54db..f5094f1b5afa7f3000c7399f4a74fa9203e98d92 100644 (file)
@@ -4188,11 +4188,10 @@ static sctp_disposition_t sctp_sf_abort_violation(
                SCTP_INC_STATS(SCTP_MIB_OUTCTRLCHUNKS);
        }
 
-discard:
-       sctp_sf_pdiscard(ep, asoc, SCTP_ST_CHUNK(0), arg, commands);
-
        SCTP_INC_STATS(SCTP_MIB_ABORTEDS);
 
+discard:
+       sctp_sf_pdiscard(ep, asoc, SCTP_ST_CHUNK(0), arg, commands);
        return SCTP_DISPOSITION_ABORT;
 
 nomem_pkt:
@@ -4265,12 +4264,10 @@ static sctp_disposition_t sctp_sf_violation_paramlen(
        sctp_add_cmd_sf(commands, SCTP_CMD_ASSOC_FAILED,
                        SCTP_PERR(SCTP_ERROR_PROTO_VIOLATION));
        SCTP_DEC_STATS(SCTP_MIB_CURRESTAB);
+       SCTP_INC_STATS(SCTP_MIB_ABORTEDS);
 
 discard:
        sctp_sf_pdiscard(ep, asoc, SCTP_ST_CHUNK(0), arg, commands);
-
-       SCTP_INC_STATS(SCTP_MIB_ABORTEDS);
-
        return SCTP_DISPOSITION_ABORT;
 nomem:
        return SCTP_DISPOSITION_NOMEM;