diff options
author | Xin Long <lucien.xin@gmail.com> | 2019-08-19 10:02:44 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-08-19 21:27:28 -0400 |
commit | bb2ded26028be00204dbe2153f98fbd1902a2187 (patch) | |
tree | bbeba048546f22b9387816127acdadb4ab95e3aa | |
parent | 4e27428fb5626f966aa961b1aad8751f2ebeef72 (diff) |
sctp: not set peer.asconf_capable in sctp_association_init
asoc->peer.asconf_capable is to be set during handshake, and its
value should be initialized to 0. net->sctp.addip_noauth will be
checked in sctp_process_init when processing INIT_ACK on client
and COOKIE_ECHO on server.
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | net/sctp/associola.c | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/net/sctp/associola.c b/net/sctp/associola.c index 5010cce52c93..d2ffc9a0ba3a 100644 --- a/net/sctp/associola.c +++ b/net/sctp/associola.c | |||
@@ -54,7 +54,6 @@ static struct sctp_association *sctp_association_init( | |||
54 | const struct sock *sk, | 54 | const struct sock *sk, |
55 | enum sctp_scope scope, gfp_t gfp) | 55 | enum sctp_scope scope, gfp_t gfp) |
56 | { | 56 | { |
57 | struct net *net = sock_net(sk); | ||
58 | struct sctp_sock *sp; | 57 | struct sctp_sock *sp; |
59 | struct sctp_paramhdr *p; | 58 | struct sctp_paramhdr *p; |
60 | int i; | 59 | int i; |
@@ -214,14 +213,6 @@ static struct sctp_association *sctp_association_init( | |||
214 | asoc->peer.sack_needed = 1; | 213 | asoc->peer.sack_needed = 1; |
215 | asoc->peer.sack_generation = 1; | 214 | asoc->peer.sack_generation = 1; |
216 | 215 | ||
217 | /* Assume that the peer will tell us if he recognizes ASCONF | ||
218 | * as part of INIT exchange. | ||
219 | * The sctp_addip_noauth option is there for backward compatibility | ||
220 | * and will revert old behavior. | ||
221 | */ | ||
222 | if (net->sctp.addip_noauth) | ||
223 | asoc->peer.asconf_capable = 1; | ||
224 | |||
225 | /* Create an input queue. */ | 216 | /* Create an input queue. */ |
226 | sctp_inq_init(&asoc->base.inqueue); | 217 | sctp_inq_init(&asoc->base.inqueue); |
227 | sctp_inq_set_th_handler(&asoc->base.inqueue, sctp_assoc_bh_rcv); | 218 | sctp_inq_set_th_handler(&asoc->base.inqueue, sctp_assoc_bh_rcv); |