mirror of
https://github.com/torvalds/linux.git
synced 2025-01-01 15:51:46 +00:00
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>
This commit is contained in:
parent
ccf355e52a
commit
a96701fb35
@ -2051,8 +2051,7 @@ struct sctp_association {
|
|||||||
temp:1, /* Is it a temporary association? */
|
temp:1, /* Is it a temporary association? */
|
||||||
force_delay:1,
|
force_delay:1,
|
||||||
intl_enable:1,
|
intl_enable:1,
|
||||||
prsctp_enable:1,
|
prsctp_enable:1;
|
||||||
reconf_enable:1;
|
|
||||||
|
|
||||||
__u8 strreset_enable;
|
__u8 strreset_enable;
|
||||||
__u8 strreset_outstanding; /* request param count on the fly */
|
__u8 strreset_outstanding; /* request param count on the fly */
|
||||||
|
@ -262,7 +262,6 @@ static struct sctp_association *sctp_association_init(
|
|||||||
|
|
||||||
asoc->active_key_id = ep->active_key_id;
|
asoc->active_key_id = ep->active_key_id;
|
||||||
asoc->prsctp_enable = ep->prsctp_enable;
|
asoc->prsctp_enable = ep->prsctp_enable;
|
||||||
asoc->reconf_enable = ep->reconf_enable;
|
|
||||||
asoc->strreset_enable = ep->strreset_enable;
|
asoc->strreset_enable = ep->strreset_enable;
|
||||||
|
|
||||||
/* Save the hmacs and chunks list into this association */
|
/* Save the hmacs and chunks list into this association */
|
||||||
|
@ -261,7 +261,7 @@ struct sctp_chunk *sctp_make_init(const struct sctp_association *asoc,
|
|||||||
num_ext += 2;
|
num_ext += 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (asoc->reconf_enable) {
|
if (asoc->ep->reconf_enable) {
|
||||||
extensions[num_ext] = SCTP_CID_RECONF;
|
extensions[num_ext] = SCTP_CID_RECONF;
|
||||||
num_ext += 1;
|
num_ext += 1;
|
||||||
}
|
}
|
||||||
@ -2007,8 +2007,7 @@ static void sctp_process_ext_param(struct sctp_association *asoc,
|
|||||||
for (i = 0; i < num_ext; i++) {
|
for (i = 0; i < num_ext; i++) {
|
||||||
switch (param.ext->chunks[i]) {
|
switch (param.ext->chunks[i]) {
|
||||||
case SCTP_CID_RECONF:
|
case SCTP_CID_RECONF:
|
||||||
if (asoc->reconf_enable &&
|
if (asoc->ep->reconf_enable)
|
||||||
!asoc->peer.reconf_capable)
|
|
||||||
asoc->peer.reconf_capable = 1;
|
asoc->peer.reconf_capable = 1;
|
||||||
break;
|
break;
|
||||||
case SCTP_CID_FWD_TSN:
|
case SCTP_CID_FWD_TSN:
|
||||||
|
@ -4226,10 +4226,7 @@ static int sctp_setsockopt_reconfig_supported(struct sock *sk,
|
|||||||
sctp_style(sk, UDP))
|
sctp_style(sk, UDP))
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
if (asoc)
|
sctp_sk(sk)->ep->reconf_enable = !!params.assoc_value;
|
||||||
asoc->reconf_enable = !!params.assoc_value;
|
|
||||||
else
|
|
||||||
sctp_sk(sk)->ep->reconf_enable = !!params.assoc_value;
|
|
||||||
|
|
||||||
retval = 0;
|
retval = 0;
|
||||||
|
|
||||||
@ -7536,7 +7533,7 @@ static int sctp_getsockopt_reconfig_supported(struct sock *sk, int len,
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
params.assoc_value = asoc ? asoc->reconf_enable
|
params.assoc_value = asoc ? asoc->peer.reconf_capable
|
||||||
: sctp_sk(sk)->ep->reconf_enable;
|
: sctp_sk(sk)->ep->reconf_enable;
|
||||||
|
|
||||||
if (put_user(len, optlen))
|
if (put_user(len, optlen))
|
||||||
|
Loading…
Reference in New Issue
Block a user