Skip to content

Commit 1c13475

Browse files
lxindavem330
authored andcommitted
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: Xin Long <lucien.xin@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent a96701f commit 1c13475

File tree

4 files changed

+6
-8
lines changed

4 files changed

+6
-8
lines changed

include/net/sctp/structs.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2050,8 +2050,7 @@ struct sctp_association {
20502050
__u8 need_ecne:1, /* Need to send an ECNE Chunk? */
20512051
temp:1, /* Is it a temporary association? */
20522052
force_delay:1,
2053-
intl_enable:1,
2054-
prsctp_enable:1;
2053+
intl_enable:1;
20552054

20562055
__u8 strreset_enable;
20572056
__u8 strreset_outstanding; /* request param count on the fly */

net/sctp/associola.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,6 @@ static struct sctp_association *sctp_association_init(
261261
goto stream_free;
262262

263263
asoc->active_key_id = ep->active_key_id;
264-
asoc->prsctp_enable = ep->prsctp_enable;
265264
asoc->strreset_enable = ep->strreset_enable;
266265

267266
/* Save the hmacs and chunks list into this association */

net/sctp/sm_make_chunk.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ struct sctp_chunk *sctp_make_init(const struct sctp_association *asoc,
247247
chunksize += SCTP_PAD4(SCTP_SAT_LEN(num_types));
248248
chunksize += sizeof(ecap_param);
249249

250-
if (asoc->prsctp_enable)
250+
if (asoc->ep->prsctp_enable)
251251
chunksize += sizeof(prsctp_param);
252252

253253
/* ADDIP: Section 4.2.7:
@@ -348,7 +348,7 @@ struct sctp_chunk *sctp_make_init(const struct sctp_association *asoc,
348348
sctp_addto_param(retval, num_ext, extensions);
349349
}
350350

351-
if (asoc->prsctp_enable)
351+
if (asoc->ep->prsctp_enable)
352352
sctp_addto_chunk(retval, sizeof(prsctp_param), &prsctp_param);
353353

354354
if (sp->adaptation_ind) {
@@ -2011,7 +2011,7 @@ static void sctp_process_ext_param(struct sctp_association *asoc,
20112011
asoc->peer.reconf_capable = 1;
20122012
break;
20132013
case SCTP_CID_FWD_TSN:
2014-
if (asoc->prsctp_enable && !asoc->peer.prsctp_capable)
2014+
if (asoc->ep->prsctp_enable)
20152015
asoc->peer.prsctp_capable = 1;
20162016
break;
20172017
case SCTP_CID_AUTH:
@@ -2636,7 +2636,7 @@ static int sctp_process_param(struct sctp_association *asoc,
26362636
break;
26372637

26382638
case SCTP_PARAM_FWD_TSN_SUPPORT:
2639-
if (asoc->prsctp_enable) {
2639+
if (asoc->ep->prsctp_enable) {
26402640
asoc->peer.prsctp_capable = 1;
26412641
break;
26422642
}

net/sctp/socket.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7325,7 +7325,7 @@ static int sctp_getsockopt_pr_supported(struct sock *sk, int len,
73257325
goto out;
73267326
}
73277327

7328-
params.assoc_value = asoc ? asoc->prsctp_enable
7328+
params.assoc_value = asoc ? asoc->peer.prsctp_capable
73297329
: sctp_sk(sk)->ep->prsctp_enable;
73307330

73317331
if (put_user(len, optlen))

0 commit comments

Comments
 (0)