sctp: add asconf_enable in struct sctp_endpoint
This patch is to make addip/asconf flag per endpoint, and its value is initialized by the per netns flag, net->sctp.addip_enable. It also replaces the checks of net->sctp.addip_enable with ep->asconf_enable in some places. Signed-off-by: Xin Long <lucien.xin@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
af809709e9
commit
4e27428fb5
@@ -52,6 +52,7 @@ static struct sctp_endpoint *sctp_endpoint_init(struct sctp_endpoint *ep,
|
||||
if (!ep->digest)
|
||||
return NULL;
|
||||
|
||||
ep->asconf_enable = net->sctp.addip_enable;
|
||||
ep->auth_enable = net->sctp.auth_enable;
|
||||
if (ep->auth_enable) {
|
||||
/* Allocate space for HMACS and CHUNKS authentication
|
||||
@@ -86,7 +87,7 @@ static struct sctp_endpoint *sctp_endpoint_init(struct sctp_endpoint *ep,
|
||||
/* If the Add-IP functionality is enabled, we must
|
||||
* authenticate, ASCONF and ASCONF-ACK chunks
|
||||
*/
|
||||
if (net->sctp.addip_enable) {
|
||||
if (ep->asconf_enable) {
|
||||
auth_chunks->chunks[0] = SCTP_CID_ASCONF;
|
||||
auth_chunks->chunks[1] = SCTP_CID_ASCONF_ACK;
|
||||
auth_chunks->param_hdr.length =
|
||||
|
Reference in New Issue
Block a user