netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vlad Yasevich <vladislav.yasevich@hp.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, lksctp-developers@lists.sourceforge.net,
	Vlad Yasevich <vladislav.yasevich@hp.com>
Subject: [PATCH 05/13] SCTP: Correctly disable ADD-IP when AUTH is not supported.
Date: Wed,  7 Nov 2007 12:46:23 -0500	[thread overview]
Message-ID: <11944575911261-git-send-email-vladislav.yasevich@hp.com> (raw)
In-Reply-To: <11944575911538-git-send-email-vladislav.yasevich@hp.com>

Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
---
 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. */
-- 
1.5.2.4


  parent reply	other threads:[~2007-11-07 18:06 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-07 17:46 [GIT PATCHES 0/13] SCTP fixes Vlad Yasevich
2007-11-07 17:46 ` [PATCH 01/13] SCTP : Fix bad formatted comment in outqueue.c Vlad Yasevich
2007-11-07 17:46 ` [PATCH 02/13] SCTP : Fix to process bundled ASCONF chunk correctly Vlad Yasevich
2007-11-07 17:46 ` [PATCH 03/13] SCTP: Fix difference cases of retransmit Vlad Yasevich
2007-11-07 17:46 ` [PATCH 04/13] SCTP: Update RCU handling during the ADD-IP case Vlad Yasevich
2007-11-07 17:46 ` Vlad Yasevich [this message]
2007-11-07 17:46 ` [PATCH 06/13] SCTP: Allow ADD-IP to work with AUTH for backward compatibility Vlad Yasevich
2007-11-07 17:46 ` [PATCH 07/13] SCTP: Fix a potential race between timers and receive path Vlad Yasevich
2007-11-07 17:46 ` [PATCH 08/13] SCTP: Use hashed lookup when looking for an association Vlad Yasevich
2007-11-09 16:48   ` Vlad Yasevich
2007-11-07 17:46 ` [PATCH 09/13] SCTP: Convert custom hash lists to use hlist Vlad Yasevich
2007-11-07 17:46 ` [PATCH 10/13] SCTP: Make sctp_verify_param return multiple indications Vlad Yasevich
2007-11-07 17:46 ` [PATCH 11/13] SCTP: Fix PR-SCTP to deliver all the accumulated ordered chunks Vlad Yasevich
2007-11-07 17:46 ` [PATCH 12/13] SCTP: Clean-up some defines for regressions tests Vlad Yasevich
2007-11-07 17:46 ` [PATCH 13/13] SCTP: Always flush the queue when uncorcking Vlad Yasevich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=11944575911261-git-send-email-vladislav.yasevich@hp.com \
    --to=vladislav.yasevich@hp.com \
    --cc=davem@davemloft.net \
    --cc=lksctp-developers@lists.sourceforge.net \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).