Commit:     853f4b505578ea3a1d9c2f5fb4ca58658ea15780
Parent:     16b4d60b56b9ec922d91cc11ede0bd59033deae4
Author:     Vlad Yasevich <[EMAIL PROTECTED]>
AuthorDate: Sun Jan 20 06:10:46 2008 -0800
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Mon Jan 28 15:08:11 2008 -0800

    [SCTP]: Correctly initialize error when parameter validation failed.
    When parameter validation fails, there should be error causes that
    specify what type of failure we've encountered.  If the causes are not
    there, we lacked memory to allocated them.  Thus make that the default
    value for the error.
    Signed-off-by: Vlad Yasevich <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
 net/sctp/sm_statefuns.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c
index 6e12757..61cbd5a 100644
--- a/net/sctp/sm_statefuns.c
+++ b/net/sctp/sm_statefuns.c
@@ -481,7 +481,6 @@ sctp_disposition_t sctp_sf_do_5_1C_ack(const struct 
sctp_endpoint *ep,
        sctp_init_chunk_t *initchunk;
        struct sctp_chunk *err_chunk;
        struct sctp_packet *packet;
-       sctp_error_t error = SCTP_ERROR_NO_ERROR;
        if (!sctp_vtag_verify(chunk, asoc))
                return sctp_sf_pdiscard(ep, asoc, type, arg, commands);
@@ -506,6 +505,8 @@ sctp_disposition_t sctp_sf_do_5_1C_ack(const struct 
sctp_endpoint *ep,
                              (sctp_init_chunk_t *)chunk->chunk_hdr, chunk,
                              &err_chunk)) {
+               sctp_error_t error = SCTP_ERROR_NO_RESOURCE;
                /* This chunk contains fatal error. It is to be discarded.
                 * Send an ABORT, with causes.  If there are no causes,
                 * then there wasn't enough memory.  Just terminate
@@ -525,8 +526,6 @@ sctp_disposition_t sctp_sf_do_5_1C_ack(const struct 
sctp_endpoint *ep,
                                error = SCTP_ERROR_INV_PARAM;
-                       } else {
-                               error = SCTP_ERROR_NO_RESOURCE;
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to