aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVlad Yasevich <vladislav.yasevich@hp.com>2007-10-24 17:24:23 -0400
committerVlad Yasevich <vladislav.yasevich@hp.com>2007-11-07 11:39:27 -0500
commit88799fe5ec65fad1d5cb1d4dc5d8f78edb949f1c (patch)
treebcb6839aaeb0cdd7411ab7ac69a1273ed53eb1e2
parent0ed90fb0f668fd07f14ae2007a809e8b26cd27a6 (diff)
SCTP: Correctly disable ADD-IP when AUTH is not supported.
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
-rw-r--r--include/net/sctp/structs.h1
-rw-r--r--net/sctp/associola.c2
-rw-r--r--net/sctp/sm_make_chunk.c5
3 files changed, 4 insertions, 4 deletions
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
index a17701740624..41f1039186dd 100644
--- a/include/net/sctp/structs.h
+++ b/include/net/sctp/structs.h
@@ -1540,7 +1540,6 @@ struct sctp_association {
1540 __u8 asconf_capable; /* Does peer support ADDIP? */ 1540 __u8 asconf_capable; /* Does peer support ADDIP? */
1541 __u8 prsctp_capable; /* Can peer do PR-SCTP? */ 1541 __u8 prsctp_capable; /* Can peer do PR-SCTP? */
1542 __u8 auth_capable; /* Is peer doing SCTP-AUTH? */ 1542 __u8 auth_capable; /* Is peer doing SCTP-AUTH? */
1543 __u8 addip_capable; /* Can peer do ADD-IP */
1544 1543
1545 __u32 adaptation_ind; /* Adaptation Code point. */ 1544 __u32 adaptation_ind; /* Adaptation Code point. */
1546 1545
diff --git a/net/sctp/associola.c b/net/sctp/associola.c
index 03158e3665da..eaad5c5535a8 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
265 /* Assume that the peer recongizes ASCONF until reported otherwise 265 /* Assume that the peer recongizes ASCONF until reported otherwise
266 * via an ERROR chunk. 266 * via an ERROR chunk.
267 */ 267 */
268 asoc->peer.asconf_capable = 1; 268 asoc->peer.asconf_capable = 0;
269 269
270 /* Create an input queue. */ 270 /* Create an input queue. */
271 sctp_inq_init(&asoc->base.inqueue); 271 sctp_inq_init(&asoc->base.inqueue);
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c
index c60564dd169d..2ff3a3df049d 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,
1847 break; 1847 break;
1848 case SCTP_CID_ASCONF: 1848 case SCTP_CID_ASCONF:
1849 case SCTP_CID_ASCONF_ACK: 1849 case SCTP_CID_ASCONF_ACK:
1850 asoc->peer.addip_capable = 1; 1850 asoc->peer.asconf_capable = 1;
1851 break; 1851 break;
1852 default: 1852 default:
1853 break; 1853 break;
@@ -2138,10 +2138,11 @@ int sctp_process_init(struct sctp_association *asoc, sctp_cid_t cid,
2138 /* If the peer claims support for ADD-IP without support 2138 /* If the peer claims support for ADD-IP without support
2139 * for AUTH, disable support for ADD-IP. 2139 * for AUTH, disable support for ADD-IP.
2140 */ 2140 */
2141 if (asoc->peer.addip_capable && !asoc->peer.auth_capable) { 2141 if (asoc->peer.asconf_capable && !asoc->peer.auth_capable) {
2142 asoc->peer.addip_disabled_mask |= (SCTP_PARAM_ADD_IP | 2142 asoc->peer.addip_disabled_mask |= (SCTP_PARAM_ADD_IP |
2143 SCTP_PARAM_DEL_IP | 2143 SCTP_PARAM_DEL_IP |
2144 SCTP_PARAM_SET_PRIMARY); 2144 SCTP_PARAM_SET_PRIMARY);
2145 asoc->peer.asconf_capable = 0;
2145 } 2146 }
2146 2147
2147 /* Walk list of transports, removing transports in the UNKNOWN state. */ 2148 /* Walk list of transports, removing transports in the UNKNOWN state. */