summaryrefslogtreecommitdiffstats
path: root/net/sctp/auth.c
diff options
context:
space:
mode:
authorXin Long <lucien.xin@gmail.com>2019-03-03 17:54:54 +0800
committerDavid S. Miller <davem@davemloft.net>2019-03-08 11:42:49 -0800
commit60208f79139af0e2f84747d04a2f3321f174a398 (patch)
treed7bee268cb2011bdfa25efb659fe6e286f4092c1 /net/sctp/auth.c
parent89664c623617b1d34447a927ac7871ddf3db29d3 (diff)
downloadlinux-60208f79139af0e2f84747d04a2f3321f174a398.tar.bz2
sctp: move up sctp_auth_init_hmacs() in sctp_endpoint_init()
sctp_auth_init_hmacs() is called only when ep->auth_enable is set. It better to move up sctp_auth_init_hmacs() and remove auth_enable check in it and check auth_enable only once in sctp_endpoint_init(). Signed-off-by: Xin Long <lucien.xin@gmail.com> Acked-by: Neil Horman <nhorman@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp/auth.c')
-rw-r--r--net/sctp/auth.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/net/sctp/auth.c b/net/sctp/auth.c
index 5b537613946f..39d72e58b8e5 100644
--- a/net/sctp/auth.c
+++ b/net/sctp/auth.c
@@ -471,12 +471,6 @@ int sctp_auth_init_hmacs(struct sctp_endpoint *ep, gfp_t gfp)
struct crypto_shash *tfm = NULL;
__u16 id;
- /* If AUTH extension is disabled, we are done */
- if (!ep->auth_enable) {
- ep->auth_hmacs = NULL;
- return 0;
- }
-
/* If the transforms are already allocated, we are done */
if (ep->auth_hmacs)
return 0;