Commit 1c134753 authored by Xin Long's avatar Xin Long Committed by David S. Miller

sctp: remove prsctp_enable from asoc

Like reconf_enable, prsctp_enable should also be removed from asoc,
as asoc->peer.prsctp_capable has taken its job.
Signed-off-by: default avatarXin Long <lucien.xin@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a96701fb
...@@ -2050,8 +2050,7 @@ struct sctp_association { ...@@ -2050,8 +2050,7 @@ struct sctp_association {
__u8 need_ecne:1, /* Need to send an ECNE Chunk? */ __u8 need_ecne:1, /* Need to send an ECNE Chunk? */
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;
__u8 strreset_enable; __u8 strreset_enable;
__u8 strreset_outstanding; /* request param count on the fly */ __u8 strreset_outstanding; /* request param count on the fly */
......
...@@ -261,7 +261,6 @@ static struct sctp_association *sctp_association_init( ...@@ -261,7 +261,6 @@ static struct sctp_association *sctp_association_init(
goto stream_free; goto stream_free;
asoc->active_key_id = ep->active_key_id; asoc->active_key_id = ep->active_key_id;
asoc->prsctp_enable = ep->prsctp_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 */
......
...@@ -247,7 +247,7 @@ struct sctp_chunk *sctp_make_init(const struct sctp_association *asoc, ...@@ -247,7 +247,7 @@ struct sctp_chunk *sctp_make_init(const struct sctp_association *asoc,
chunksize += SCTP_PAD4(SCTP_SAT_LEN(num_types)); chunksize += SCTP_PAD4(SCTP_SAT_LEN(num_types));
chunksize += sizeof(ecap_param); chunksize += sizeof(ecap_param);
if (asoc->prsctp_enable) if (asoc->ep->prsctp_enable)
chunksize += sizeof(prsctp_param); chunksize += sizeof(prsctp_param);
/* ADDIP: Section 4.2.7: /* ADDIP: Section 4.2.7:
...@@ -348,7 +348,7 @@ struct sctp_chunk *sctp_make_init(const struct sctp_association *asoc, ...@@ -348,7 +348,7 @@ struct sctp_chunk *sctp_make_init(const struct sctp_association *asoc,
sctp_addto_param(retval, num_ext, extensions); sctp_addto_param(retval, num_ext, extensions);
} }
if (asoc->prsctp_enable) if (asoc->ep->prsctp_enable)
sctp_addto_chunk(retval, sizeof(prsctp_param), &prsctp_param); sctp_addto_chunk(retval, sizeof(prsctp_param), &prsctp_param);
if (sp->adaptation_ind) { if (sp->adaptation_ind) {
...@@ -2011,7 +2011,7 @@ static void sctp_process_ext_param(struct sctp_association *asoc, ...@@ -2011,7 +2011,7 @@ static void sctp_process_ext_param(struct sctp_association *asoc,
asoc->peer.reconf_capable = 1; asoc->peer.reconf_capable = 1;
break; break;
case SCTP_CID_FWD_TSN: case SCTP_CID_FWD_TSN:
if (asoc->prsctp_enable && !asoc->peer.prsctp_capable) if (asoc->ep->prsctp_enable)
asoc->peer.prsctp_capable = 1; asoc->peer.prsctp_capable = 1;
break; break;
case SCTP_CID_AUTH: case SCTP_CID_AUTH:
...@@ -2636,7 +2636,7 @@ static int sctp_process_param(struct sctp_association *asoc, ...@@ -2636,7 +2636,7 @@ static int sctp_process_param(struct sctp_association *asoc,
break; break;
case SCTP_PARAM_FWD_TSN_SUPPORT: case SCTP_PARAM_FWD_TSN_SUPPORT:
if (asoc->prsctp_enable) { if (asoc->ep->prsctp_enable) {
asoc->peer.prsctp_capable = 1; asoc->peer.prsctp_capable = 1;
break; break;
} }
......
...@@ -7325,7 +7325,7 @@ static int sctp_getsockopt_pr_supported(struct sock *sk, int len, ...@@ -7325,7 +7325,7 @@ static int sctp_getsockopt_pr_supported(struct sock *sk, int len,
goto out; goto out;
} }
params.assoc_value = asoc ? asoc->prsctp_enable params.assoc_value = asoc ? asoc->peer.prsctp_capable
: sctp_sk(sk)->ep->prsctp_enable; : sctp_sk(sk)->ep->prsctp_enable;
if (put_user(len, optlen)) if (put_user(len, optlen))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment