Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Xin Long and committed by
David S. Miller
1c134753 a96701fb

+6 -8
+1 -2
include/net/sctp/structs.h
··· 2050 2050 __u8 need_ecne:1, /* Need to send an ECNE Chunk? */ 2051 2051 temp:1, /* Is it a temporary association? */ 2052 2052 force_delay:1, 2053 - intl_enable:1, 2054 - prsctp_enable:1; 2053 + intl_enable:1; 2055 2054 2056 2055 __u8 strreset_enable; 2057 2056 __u8 strreset_outstanding; /* request param count on the fly */
-1
net/sctp/associola.c
··· 261 261 goto stream_free; 262 262 263 263 asoc->active_key_id = ep->active_key_id; 264 - asoc->prsctp_enable = ep->prsctp_enable; 265 264 asoc->strreset_enable = ep->strreset_enable; 266 265 267 266 /* Save the hmacs and chunks list into this association */
+4 -4
net/sctp/sm_make_chunk.c
··· 247 247 chunksize += SCTP_PAD4(SCTP_SAT_LEN(num_types)); 248 248 chunksize += sizeof(ecap_param); 249 249 250 - if (asoc->prsctp_enable) 250 + if (asoc->ep->prsctp_enable) 251 251 chunksize += sizeof(prsctp_param); 252 252 253 253 /* ADDIP: Section 4.2.7: ··· 348 348 sctp_addto_param(retval, num_ext, extensions); 349 349 } 350 350 351 - if (asoc->prsctp_enable) 351 + if (asoc->ep->prsctp_enable) 352 352 sctp_addto_chunk(retval, sizeof(prsctp_param), &prsctp_param); 353 353 354 354 if (sp->adaptation_ind) { ··· 2011 2011 asoc->peer.reconf_capable = 1; 2012 2012 break; 2013 2013 case SCTP_CID_FWD_TSN: 2014 - if (asoc->prsctp_enable && !asoc->peer.prsctp_capable) 2014 + if (asoc->ep->prsctp_enable) 2015 2015 asoc->peer.prsctp_capable = 1; 2016 2016 break; 2017 2017 case SCTP_CID_AUTH: ··· 2636 2636 break; 2637 2637 2638 2638 case SCTP_PARAM_FWD_TSN_SUPPORT: 2639 - if (asoc->prsctp_enable) { 2639 + if (asoc->ep->prsctp_enable) { 2640 2640 asoc->peer.prsctp_capable = 1; 2641 2641 break; 2642 2642 }
+1 -1
net/sctp/socket.c
··· 7325 7325 goto out; 7326 7326 } 7327 7327 7328 - params.assoc_value = asoc ? asoc->prsctp_enable 7328 + params.assoc_value = asoc ? asoc->peer.prsctp_capable 7329 7329 : sctp_sk(sk)->ep->prsctp_enable; 7330 7330 7331 7331 if (put_user(len, optlen))