sctp: not set peer.asconf_capable in sctp_association_init
authorXin Long <lucien.xin@gmail.com>
Mon, 19 Aug 2019 14:02:44 +0000 (22:02 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 20 Aug 2019 01:27:28 +0000 (18:27 -0700)
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>
net/sctp/associola.c

index 5010cce52c9359ee9ab0a163900c017edbe41fdf..d2ffc9a0ba3a608637472a3492043ce088acabe0 100644 (file)
@@ -54,7 +54,6 @@ static struct sctp_association *sctp_association_init(
                                        const struct sock *sk,
                                        enum sctp_scope scope, gfp_t gfp)
 {
-       struct net *net = sock_net(sk);
        struct sctp_sock *sp;
        struct sctp_paramhdr *p;
        int i;
@@ -214,14 +213,6 @@ static struct sctp_association *sctp_association_init(
        asoc->peer.sack_needed = 1;
        asoc->peer.sack_generation = 1;
 
-       /* Assume that the peer will tell us if he recognizes ASCONF
-        * as part of INIT exchange.
-        * The sctp_addip_noauth option is there for backward compatibility
-        * and will revert old behavior.
-        */
-       if (net->sctp.addip_noauth)
-               asoc->peer.asconf_capable = 1;
-
        /* Create an input queue.  */
        sctp_inq_init(&asoc->base.inqueue);
        sctp_inq_set_th_handler(&asoc->base.inqueue, sctp_assoc_bh_rcv);