Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=88799fe5ec65fad1d5cb1d4dc5d8f78edb949f1c
Commit:     88799fe5ec65fad1d5cb1d4dc5d8f78edb949f1c
Parent:     0ed90fb0f668fd07f14ae2007a809e8b26cd27a6
Author:     Vlad Yasevich <[EMAIL PROTECTED]>
AuthorDate: Wed Oct 24 17:24:23 2007 -0400
Committer:  Vlad Yasevich <[EMAIL PROTECTED]>
CommitDate: Wed Nov 7 11:39:27 2007 -0500

    SCTP: Correctly disable ADD-IP when AUTH is not supported.
    
    Signed-off-by: Vlad Yasevich <[EMAIL PROTECTED]>
---
 include/net/sctp/structs.h |    1 -
 net/sctp/associola.c       |    2 +-
 net/sctp/sm_make_chunk.c   |    5 +++--
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
index a177017..41f1039 100644
--- a/include/net/sctp/structs.h
+++ b/include/net/sctp/structs.h
@@ -1540,7 +1540,6 @@ struct sctp_association {
                __u8    asconf_capable;  /* Does peer support ADDIP? */
                __u8    prsctp_capable;  /* Can peer do PR-SCTP? */
                __u8    auth_capable;    /* Is peer doing SCTP-AUTH? */
-               __u8    addip_capable;   /* Can peer do ADD-IP */
 
                __u32   adaptation_ind;  /* Adaptation Code point. */
 
diff --git a/net/sctp/associola.c b/net/sctp/associola.c
index 03158e3..eaad5c5 100644
--- a/net/sctp/associola.c
+++ b/net/sctp/associola.c
@@ -265,7 +265,7 @@ static struct sctp_association 
*sctp_association_init(struct sctp_association *a
        /* Assume that the peer recongizes ASCONF until reported otherwise
         * via an ERROR chunk.
         */
-       asoc->peer.asconf_capable = 1;
+       asoc->peer.asconf_capable = 0;
 
        /* Create an input queue.  */
        sctp_inq_init(&asoc->base.inqueue);
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c
index c60564d..2ff3a3d 100644
--- a/net/sctp/sm_make_chunk.c
+++ b/net/sctp/sm_make_chunk.c
@@ -1847,7 +1847,7 @@ static void sctp_process_ext_param(struct 
sctp_association *asoc,
                            break;
                    case SCTP_CID_ASCONF:
                    case SCTP_CID_ASCONF_ACK:
-                           asoc->peer.addip_capable = 1;
+                           asoc->peer.asconf_capable = 1;
                            break;
                    default:
                            break;
@@ -2138,10 +2138,11 @@ int sctp_process_init(struct sctp_association *asoc, 
sctp_cid_t cid,
        /* If the peer claims support for ADD-IP without support
         * for AUTH, disable support for ADD-IP.
         */
-       if (asoc->peer.addip_capable && !asoc->peer.auth_capable) {
+       if (asoc->peer.asconf_capable && !asoc->peer.auth_capable) {
                asoc->peer.addip_disabled_mask |= (SCTP_PARAM_ADD_IP |
                                                  SCTP_PARAM_DEL_IP |
                                                  SCTP_PARAM_SET_PRIMARY);
+               asoc->peer.asconf_capable = 0;
        }
 
        /* Walk list of transports, removing transports in the UNKNOWN state. */
-
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