aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/net/sctp/structs.h1
-rw-r--r--net/sctp/sm_make_chunk.c13
2 files changed, 13 insertions, 1 deletions
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
index 47e54f8e2b65..448f713a0205 100644
--- a/include/net/sctp/structs.h
+++ b/include/net/sctp/structs.h
@@ -1543,6 +1543,7 @@ struct sctp_association {
1543 __u8 asconf_capable; /* Does peer support ADDIP? */ 1543 __u8 asconf_capable; /* Does peer support ADDIP? */
1544 __u8 prsctp_capable; /* Can peer do PR-SCTP? */ 1544 __u8 prsctp_capable; /* Can peer do PR-SCTP? */
1545 __u8 auth_capable; /* Is peer doing SCTP-AUTH? */ 1545 __u8 auth_capable; /* Is peer doing SCTP-AUTH? */
1546 __u8 addip_capable; /* Can peer do ADD-IP */
1546 1547
1547 __u32 adaptation_ind; /* Adaptation Code point. */ 1548 __u32 adaptation_ind; /* Adaptation Code point. */
1548 1549
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c
index fa2ba543183d..f983a369d4e2 100644
--- a/net/sctp/sm_make_chunk.c
+++ b/net/sctp/sm_make_chunk.c
@@ -1851,7 +1851,8 @@ static void sctp_process_ext_param(struct sctp_association *asoc,
1851 break; 1851 break;
1852 case SCTP_CID_ASCONF: 1852 case SCTP_CID_ASCONF:
1853 case SCTP_CID_ASCONF_ACK: 1853 case SCTP_CID_ASCONF_ACK:
1854 /* don't need to do anything for ASCONF */ 1854 asoc->peer.addip_capable = 1;
1855 break;
1855 default: 1856 default:
1856 break; 1857 break;
1857 } 1858 }
@@ -2137,6 +2138,16 @@ int sctp_process_init(struct sctp_association *asoc, sctp_cid_t cid,
2137 !asoc->peer.peer_hmacs)) 2138 !asoc->peer.peer_hmacs))
2138 asoc->peer.auth_capable = 0; 2139 asoc->peer.auth_capable = 0;
2139 2140
2141
2142 /* If the peer claims support for ADD-IP without support
2143 * for AUTH, disable support for ADD-IP.
2144 */
2145 if (asoc->peer.addip_capable && !asoc->peer.auth_capable) {
2146 asoc->peer.addip_disabled_mask |= (SCTP_PARAM_ADD_IP |
2147 SCTP_PARAM_DEL_IP |
2148 SCTP_PARAM_SET_PRIMARY);
2149 }
2150
2140 /* Walk list of transports, removing transports in the UNKNOWN state. */ 2151 /* Walk list of transports, removing transports in the UNKNOWN state. */
2141 list_for_each_safe(pos, temp, &asoc->peer.transport_addr_list) { 2152 list_for_each_safe(pos, temp, &asoc->peer.transport_addr_list) {
2142 transport = list_entry(pos, struct sctp_transport, transports); 2153 transport = list_entry(pos, struct sctp_transport, transports);