summaryrefslogtreecommitdiffstats
path: root/net/sctp/socket.c
diff options
context:
space:
mode:
authorXin Long2019-07-08 18:57:04 +0200
committerDavid S. Miller2019-07-09 05:16:24 +0200
commita96701fb3534c45bd6fe5e6f6d3a91e3acc19b59 (patch)
treebe56976cfbd9691bf79039fe50c95be1e119137a /net/sctp/socket.c
parentnet: phy: Make use of linkmode_mod_bit helper (diff)
downloadkernel-qcow2-linux-a96701fb3534c45bd6fe5e6f6d3a91e3acc19b59.tar.gz
kernel-qcow2-linux-a96701fb3534c45bd6fe5e6f6d3a91e3acc19b59.tar.xz
kernel-qcow2-linux-a96701fb3534c45bd6fe5e6f6d3a91e3acc19b59.zip
sctp: remove reconf_enable from asoc
asoc's reconf support is actually decided by the 4-shakehand negotiation, not something that users can set by sockopt. asoc->peer.reconf_capable is working for this. So remove it from asoc. Signed-off-by: Xin Long <lucien.xin@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp/socket.c')
-rw-r--r--net/sctp/socket.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index f33aa9ee9e27..d8bcc4711d4a 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -4226,10 +4226,7 @@ static int sctp_setsockopt_reconfig_supported(struct sock *sk,
sctp_style(sk, UDP))
goto out;
- if (asoc)
- asoc->reconf_enable = !!params.assoc_value;
- else
- sctp_sk(sk)->ep->reconf_enable = !!params.assoc_value;
+ sctp_sk(sk)->ep->reconf_enable = !!params.assoc_value;
retval = 0;
@@ -7536,7 +7533,7 @@ static int sctp_getsockopt_reconfig_supported(struct sock *sk, int len,
goto out;
}
- params.assoc_value = asoc ? asoc->reconf_enable
+ params.assoc_value = asoc ? asoc->peer.reconf_capable
: sctp_sk(sk)->ep->reconf_enable;
if (put_user(len, optlen))