sctp: move up sctp_auth_init_hmacs() in sctp_endpoint_init()
authorXin Long <lucien.xin@gmail.com>
Sun, 3 Mar 2019 09:54:54 +0000 (17:54 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 8 Mar 2019 19:42:49 +0000 (11:42 -0800)
commit60208f79139af0e2f84747d04a2f3321f174a398
treed7bee268cb2011bdfa25efb659fe6e286f4092c1
parent89664c623617b1d34447a927ac7871ddf3db29d3
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>
net/sctp/auth.c
net/sctp/endpointola.c