Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=6df9cfc1ad45839e2a11330ab354330c6128cb73
Commit:     6df9cfc1ad45839e2a11330ab354330c6128cb73
Parent:     f691724c4d3b150bfa9cc8a969ea2020e20dfb12
Author:     Vlad Yasevich <[EMAIL PROTECTED]>
AuthorDate: Mon Jan 7 00:27:45 2008 -0800
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Tue Jan 8 23:30:03 2008 -0800

    [SCTP]: Correctly handle AUTH parameters in unexpected INIT
    
    When processing an unexpected INIT chunk, we do not need to
    do any preservation of the old AUTH parameters.  In fact,
    doing such preservations will nullify AUTH and allow connection
    stealing.
    
    Signed-off-by: Vlad Yasevich <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 net/sctp/sm_statefuns.c |   22 ----------------------
 1 files changed, 0 insertions(+), 22 deletions(-)

diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c
index 5fb8477..d247ed4 100644
--- a/net/sctp/sm_statefuns.c
+++ b/net/sctp/sm_statefuns.c
@@ -1309,26 +1309,6 @@ static void sctp_tietags_populate(struct 
sctp_association *new_asoc,
        new_asoc->c.initial_tsn         = asoc->c.initial_tsn;
 }
 
-static void sctp_auth_params_populate(struct sctp_association *new_asoc,
-                                   const struct sctp_association *asoc)
-{
-       /* Only perform this if AUTH extension is enabled */
-       if (!sctp_auth_enable)
-               return;
-
-       /* We need to provide the same parameter information as
-        * was in the original INIT.  This means that we need to copy
-        * the HMACS, CHUNKS, and RANDOM parameter from the original
-        * assocaition.
-        */
-       memcpy(new_asoc->c.auth_random, asoc->c.auth_random,
-               sizeof(asoc->c.auth_random));
-       memcpy(new_asoc->c.auth_hmacs, asoc->c.auth_hmacs,
-               sizeof(asoc->c.auth_hmacs));
-       memcpy(new_asoc->c.auth_chunks, asoc->c.auth_chunks,
-               sizeof(asoc->c.auth_chunks));
-}
-
 /*
  * Compare vtag/tietag values to determine unexpected COOKIE-ECHO
  * handling action.
@@ -1486,8 +1466,6 @@ static sctp_disposition_t sctp_sf_do_unexpected_init(
 
        sctp_tietags_populate(new_asoc, asoc);
 
-       sctp_auth_params_populate(new_asoc, asoc);
-
        /* B) "Z" shall respond immediately with an INIT ACK chunk.  */
 
        /* If there are errors need to be reported for unknown parameters,
-
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  http://vger.kernel.org/majordomo-info.html

Reply via email to