diff options
author | Xin Long <lucien.xin@gmail.com> | 2019-07-08 19:57:04 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-07-09 06:16:24 +0300 |
commit | a96701fb3534c45bd6fe5e6f6d3a91e3acc19b59 (patch) | |
tree | be56976cfbd9691bf79039fe50c95be1e119137a /net/sctp/socket.c | |
parent | ccf355e52a3265624b7acadd693c849d599e9b9f (diff) | |
download | linux-a96701fb3534c45bd6fe5e6f6d3a91e3acc19b59.tar.xz |
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.c | 7 |
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)) |