Skip to content

Commit

Permalink
sctp: Fix SNMP number of SCTP_MIB_ABORTED during violation handling.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Vlad Yasevich authored and David S. Miller committed Oct 9, 2008
1 parent 3d5a019 commit 56eb82b
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions net/sctp/sm_statefuns.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 56eb82b

Please sign in to comment.