sctp: factor out sctp_connect_add_peer
authorXin Long <lucien.xin@gmail.com>
Tue, 30 Jul 2019 12:38:23 +0000 (20:38 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 30 Jul 2019 21:18:14 +0000 (14:18 -0700)
commita64e59c72ca6383149a19164abd29f81e640c08d
treea5f57e36905d6f4553d6e7bd12e7721e010b33f1
parentf26f995122f4c16c3a863aacbe85043135976632
sctp: factor out sctp_connect_add_peer

In this function factored out from sctp_sendmsg_new_asoc() and
__sctp_connect(), it adds a peer with the other addr into the
asoc after this asoc is created with the 1st addr.

Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sctp/socket.c