netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] sctp: do not enable peer features if we can't do them.
@ 2008-09-18 21:31 Vlad Yasevich
  2008-09-18 21:31 ` [PATCH 2/2] sctp: Fix oops when INIT-ACK indicates that peer doesn't support AUTH Vlad Yasevich
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Vlad Yasevich @ 2008-09-18 21:31 UTC (permalink / raw)
  To: davem; +Cc: linux-sctp, lksctp-developers, netdev, Vlad Yasevich

Do not enable peer features like addip and auth, if they
are administratively disabled localy.  If the peer resports
that he supports something that we don't, neither end can
use it so enabling it is pointless.  This solves a problem
when talking to a peer that has auth and addip enabled while
we do not.  Found by Andrei Pelinescu-Onciul <andrei@iptel.org>.

Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
---
 net/sctp/sm_make_chunk.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c
index e8ca4e5..fe94f42 100644
--- a/net/sctp/sm_make_chunk.c
+++ b/net/sctp/sm_make_chunk.c
@@ -1886,11 +1886,13 @@ static void sctp_process_ext_param(struct sctp_association *asoc,
 			    /* if the peer reports AUTH, assume that he
 			     * supports AUTH.
 			     */
-			    asoc->peer.auth_capable = 1;
+			    if (sctp_auth_enable)
+				    asoc->peer.auth_capable = 1;
 			    break;
 		    case SCTP_CID_ASCONF:
 		    case SCTP_CID_ASCONF_ACK:
-			    asoc->peer.asconf_capable = 1;
+			    if (sctp_addip_enable)
+				    asoc->peer.asconf_capable = 1;
 			    break;
 		    default:
 			    break;
@@ -2460,6 +2462,9 @@ do_addr_param:
 		break;
 
 	case SCTP_PARAM_SET_PRIMARY:
+		if (!sctp_addip_enable)
+			goto fall_through;
+
 		addr_param = param.v + sizeof(sctp_addip_param_t);
 
 		af = sctp_get_af_specific(param_type2af(param.p->type));
-- 
1.5.3.5


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-09-19  3:01 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-18 21:31 [PATCH 1/2] sctp: do not enable peer features if we can't do them Vlad Yasevich
2008-09-18 21:31 ` [PATCH 2/2] sctp: Fix oops when INIT-ACK indicates that peer doesn't support AUTH Vlad Yasevich
2008-09-18 23:29   ` David Miller
2008-09-18 23:01 ` [Lksctp-developers] [PATCH 1/2] sctp: do not enable peer features if we can't do them Vlad Yasevich
2008-09-18 23:18   ` David Miller
2008-09-18 23:29 ` David Miller
2008-09-19  3:01   ` Vlad Yasevich

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).