From 267c727303dcbb6de15b77ad6289f69cc27a1f18 Mon Sep 17 00:00:00 2001 From: Vlad Yasevich Date: Sun, 16 Sep 2007 19:35:39 -0700 Subject: [PATCH] --- yaml --- r: 66623 b: refs/heads/master c: 6b2f9cb64db2d2460da17900bf54266030cc24f1 h: refs/heads/master i: 66621: 57e7fbbb843b6641dd2674dc302d0cd9e41853f3 66619: 619d491e884ec7d3bed2baea6c0db5e42c8e52a1 66615: 6a3328728561f5fd4b0dbbe7b85d7ad5c6befa64 66607: a5635ddcd7b04430570ac25fe4dd41f53060d6b0 66591: 6d5ab928a0242b6da0b5c28939a8a4dc915a458e 66559: f6416ee65f5cbf1a0df0616c9962db317483ff7c v: v3 --- [refs] | 2 +- trunk/include/net/sctp/structs.h | 1 + trunk/net/sctp/sm_make_chunk.c | 13 ++++++++++++- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 74e9f8b666f7..10c1274b8b08 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 65b07e5d0d09c77e98050b5f0146ead29e5add32 +refs/heads/master: 6b2f9cb64db2d2460da17900bf54266030cc24f1 diff --git a/trunk/include/net/sctp/structs.h b/trunk/include/net/sctp/structs.h index 47e54f8e2b65..448f713a0205 100644 --- a/trunk/include/net/sctp/structs.h +++ b/trunk/include/net/sctp/structs.h @@ -1543,6 +1543,7 @@ 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/trunk/net/sctp/sm_make_chunk.c b/trunk/net/sctp/sm_make_chunk.c index fa2ba543183d..f983a369d4e2 100644 --- a/trunk/net/sctp/sm_make_chunk.c +++ b/trunk/net/sctp/sm_make_chunk.c @@ -1851,7 +1851,8 @@ static void sctp_process_ext_param(struct sctp_association *asoc, break; case SCTP_CID_ASCONF: case SCTP_CID_ASCONF_ACK: - /* don't need to do anything for ASCONF */ + asoc->peer.addip_capable = 1; + break; default: break; } @@ -2137,6 +2138,16 @@ int sctp_process_init(struct sctp_association *asoc, sctp_cid_t cid, !asoc->peer.peer_hmacs)) asoc->peer.auth_capable = 0; + + /* 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) { + asoc->peer.addip_disabled_mask |= (SCTP_PARAM_ADD_IP | + SCTP_PARAM_DEL_IP | + SCTP_PARAM_SET_PRIMARY); + } + /* Walk list of transports, removing transports in the UNKNOWN state. */ list_for_each_safe(pos, temp, &asoc->peer.transport_addr_list) { transport = list_entry(pos, struct sctp_transport, transports);