aboutsummaryrefslogtreecommitdiffstats
path: root/net/sctp/endpointola.c
diff options
context:
space:
mode:
authorXin Long <lucien.xin@gmail.com>2019-08-19 22:02:43 +0800
committerDavid S. Miller <davem@davemloft.net>2019-08-19 18:27:28 -0700
commit4e27428fb5626f966aa961b1aad8751f2ebeef72 (patch)
treefd1e02768a723e6e7dbf97e289b6afceb9181223 /net/sctp/endpointola.c
parentnet: remove empty inet_exit_net (diff)
downloadlinux-dev-4e27428fb5626f966aa961b1aad8751f2ebeef72.tar.xz
linux-dev-4e27428fb5626f966aa961b1aad8751f2ebeef72.zip
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>
Diffstat (limited to 'net/sctp/endpointola.c')
-rw-r--r--net/sctp/endpointola.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/sctp/endpointola.c b/net/sctp/endpointola.c
index 69cebb2c998b..38b8d7cf8557 100644
--- a/net/sctp/endpointola.c
+++ b/net/sctp/endpointola.c
@@ -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 =