aboutsummaryrefslogtreecommitdiffstats
path: root/net/sctp/protocol.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sctp/protocol.c')
-rw-r--r--net/sctp/protocol.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c
index 2d518425d598..f898b1c58bd2 100644
--- a/net/sctp/protocol.c
+++ b/net/sctp/protocol.c
@@ -86,7 +86,7 @@ int sysctl_sctp_rmem[3];
86int sysctl_sctp_wmem[3]; 86int sysctl_sctp_wmem[3];
87 87
88/* Set up the proc fs entry for the SCTP protocol. */ 88/* Set up the proc fs entry for the SCTP protocol. */
89static __net_init int sctp_proc_init(struct net *net) 89static int __net_init sctp_proc_init(struct net *net)
90{ 90{
91#ifdef CONFIG_PROC_FS 91#ifdef CONFIG_PROC_FS
92 net->sctp.proc_net_sctp = proc_net_mkdir(net, "sctp", net->proc_net); 92 net->sctp.proc_net_sctp = proc_net_mkdir(net, "sctp", net->proc_net);
@@ -1165,7 +1165,7 @@ static void sctp_v4_del_protocol(void)
1165 unregister_inetaddr_notifier(&sctp_inetaddr_notifier); 1165 unregister_inetaddr_notifier(&sctp_inetaddr_notifier);
1166} 1166}
1167 1167
1168static int sctp_net_init(struct net *net) 1168static int __net_init sctp_net_init(struct net *net)
1169{ 1169{
1170 int status; 1170 int status;
1171 1171
@@ -1190,6 +1190,15 @@ static int sctp_net_init(struct net *net)
1190 /* Whether Cookie Preservative is enabled(1) or not(0) */ 1190 /* Whether Cookie Preservative is enabled(1) or not(0) */
1191 net->sctp.cookie_preserve_enable = 1; 1191 net->sctp.cookie_preserve_enable = 1;
1192 1192
1193 /* Default sctp sockets to use md5 as their hmac alg */
1194#if defined (CONFIG_SCTP_DEFAULT_COOKIE_HMAC_MD5)
1195 net->sctp.sctp_hmac_alg = "md5";
1196#elif defined (CONFIG_SCTP_DEFAULT_COOKIE_HMAC_SHA1)
1197 net->sctp.sctp_hmac_alg = "sha1";
1198#else
1199 net->sctp.sctp_hmac_alg = NULL;
1200#endif
1201
1193 /* Max.Burst - 4 */ 1202 /* Max.Burst - 4 */
1194 net->sctp.max_burst = SCTP_DEFAULT_MAX_BURST; 1203 net->sctp.max_burst = SCTP_DEFAULT_MAX_BURST;
1195 1204
@@ -1281,7 +1290,7 @@ err_sysctl_register:
1281 return status; 1290 return status;
1282} 1291}
1283 1292
1284static void sctp_net_exit(struct net *net) 1293static void __net_exit sctp_net_exit(struct net *net)
1285{ 1294{
1286 /* Free the local address list */ 1295 /* Free the local address list */
1287 sctp_free_addr_wq(net); 1296 sctp_free_addr_wq(net);