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.c128
1 files changed, 64 insertions, 64 deletions
diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c
index 59965bdea07..2d518425d59 100644
--- a/net/sctp/protocol.c
+++ b/net/sctp/protocol.c
@@ -1169,6 +1169,70 @@ static int sctp_net_init(struct net *net)
1169{ 1169{
1170 int status; 1170 int status;
1171 1171
1172 /*
1173 * 14. Suggested SCTP Protocol Parameter Values
1174 */
1175 /* The following protocol parameters are RECOMMENDED: */
1176 /* RTO.Initial - 3 seconds */
1177 net->sctp.rto_initial = SCTP_RTO_INITIAL;
1178 /* RTO.Min - 1 second */
1179 net->sctp.rto_min = SCTP_RTO_MIN;
1180 /* RTO.Max - 60 seconds */
1181 net->sctp.rto_max = SCTP_RTO_MAX;
1182 /* RTO.Alpha - 1/8 */
1183 net->sctp.rto_alpha = SCTP_RTO_ALPHA;
1184 /* RTO.Beta - 1/4 */
1185 net->sctp.rto_beta = SCTP_RTO_BETA;
1186
1187 /* Valid.Cookie.Life - 60 seconds */
1188 net->sctp.valid_cookie_life = SCTP_DEFAULT_COOKIE_LIFE;
1189
1190 /* Whether Cookie Preservative is enabled(1) or not(0) */
1191 net->sctp.cookie_preserve_enable = 1;
1192
1193 /* Max.Burst - 4 */
1194 net->sctp.max_burst = SCTP_DEFAULT_MAX_BURST;
1195
1196 /* Association.Max.Retrans - 10 attempts
1197 * Path.Max.Retrans - 5 attempts (per destination address)
1198 * Max.Init.Retransmits - 8 attempts
1199 */
1200 net->sctp.max_retrans_association = 10;
1201 net->sctp.max_retrans_path = 5;
1202 net->sctp.max_retrans_init = 8;
1203
1204 /* Sendbuffer growth - do per-socket accounting */
1205 net->sctp.sndbuf_policy = 0;
1206
1207 /* Rcvbuffer growth - do per-socket accounting */
1208 net->sctp.rcvbuf_policy = 0;
1209
1210 /* HB.interval - 30 seconds */
1211 net->sctp.hb_interval = SCTP_DEFAULT_TIMEOUT_HEARTBEAT;
1212
1213 /* delayed SACK timeout */
1214 net->sctp.sack_timeout = SCTP_DEFAULT_TIMEOUT_SACK;
1215
1216 /* Disable ADDIP by default. */
1217 net->sctp.addip_enable = 0;
1218 net->sctp.addip_noauth = 0;
1219 net->sctp.default_auto_asconf = 0;
1220
1221 /* Enable PR-SCTP by default. */
1222 net->sctp.prsctp_enable = 1;
1223
1224 /* Disable AUTH by default. */
1225 net->sctp.auth_enable = 0;
1226
1227 /* Set SCOPE policy to enabled */
1228 net->sctp.scope_policy = SCTP_SCOPE_POLICY_ENABLE;
1229
1230 /* Set the default rwnd update threshold */
1231 net->sctp.rwnd_upd_shift = SCTP_DEFAULT_RWND_SHIFT;
1232
1233 /* Initialize maximum autoclose timeout. */
1234 net->sctp.max_autoclose = INT_MAX / HZ;
1235
1172 status = sctp_sysctl_net_register(net); 1236 status = sctp_sysctl_net_register(net);
1173 if (status) 1237 if (status)
1174 goto err_sysctl_register; 1238 goto err_sysctl_register;
@@ -1272,59 +1336,12 @@ SCTP_STATIC __init int sctp_init(void)
1272 if (status) 1336 if (status)
1273 goto err_percpu_counter_init; 1337 goto err_percpu_counter_init;
1274 1338
1275 /*
1276 * 14. Suggested SCTP Protocol Parameter Values
1277 */
1278 /* The following protocol parameters are RECOMMENDED: */
1279 /* RTO.Initial - 3 seconds */
1280 sctp_rto_initial = SCTP_RTO_INITIAL;
1281 /* RTO.Min - 1 second */
1282 sctp_rto_min = SCTP_RTO_MIN;
1283 /* RTO.Max - 60 seconds */
1284 sctp_rto_max = SCTP_RTO_MAX;
1285 /* RTO.Alpha - 1/8 */
1286 sctp_rto_alpha = SCTP_RTO_ALPHA;
1287 /* RTO.Beta - 1/4 */
1288 sctp_rto_beta = SCTP_RTO_BETA;
1289
1290 /* Valid.Cookie.Life - 60 seconds */
1291 sctp_valid_cookie_life = SCTP_DEFAULT_COOKIE_LIFE;
1292
1293 /* Whether Cookie Preservative is enabled(1) or not(0) */
1294 sctp_cookie_preserve_enable = 1;
1295
1296 /* Max.Burst - 4 */
1297 sctp_max_burst = SCTP_DEFAULT_MAX_BURST;
1298
1299 /* Association.Max.Retrans - 10 attempts
1300 * Path.Max.Retrans - 5 attempts (per destination address)
1301 * Max.Init.Retransmits - 8 attempts
1302 */
1303 sctp_max_retrans_association = 10;
1304 sctp_max_retrans_path = 5;
1305 sctp_max_retrans_init = 8;
1306
1307 /* Sendbuffer growth - do per-socket accounting */
1308 sctp_sndbuf_policy = 0;
1309
1310 /* Rcvbuffer growth - do per-socket accounting */
1311 sctp_rcvbuf_policy = 0;
1312
1313 /* HB.interval - 30 seconds */
1314 sctp_hb_interval = SCTP_DEFAULT_TIMEOUT_HEARTBEAT;
1315
1316 /* delayed SACK timeout */
1317 sctp_sack_timeout = SCTP_DEFAULT_TIMEOUT_SACK;
1318
1319 /* Implementation specific variables. */ 1339 /* Implementation specific variables. */
1320 1340
1321 /* Initialize default stream count setup information. */ 1341 /* Initialize default stream count setup information. */
1322 sctp_max_instreams = SCTP_DEFAULT_INSTREAMS; 1342 sctp_max_instreams = SCTP_DEFAULT_INSTREAMS;
1323 sctp_max_outstreams = SCTP_DEFAULT_OUTSTREAMS; 1343 sctp_max_outstreams = SCTP_DEFAULT_OUTSTREAMS;
1324 1344
1325 /* Initialize maximum autoclose timeout. */
1326 sctp_max_autoclose = INT_MAX / HZ;
1327
1328 /* Initialize handle used for association ids. */ 1345 /* Initialize handle used for association ids. */
1329 idr_init(&sctp_assocs_id); 1346 idr_init(&sctp_assocs_id);
1330 1347
@@ -1411,23 +1428,6 @@ SCTP_STATIC __init int sctp_init(void)
1411 pr_info("Hash tables configured (established %d bind %d)\n", 1428 pr_info("Hash tables configured (established %d bind %d)\n",
1412 sctp_assoc_hashsize, sctp_port_hashsize); 1429 sctp_assoc_hashsize, sctp_port_hashsize);
1413 1430
1414 /* Disable ADDIP by default. */
1415 sctp_addip_enable = 0;
1416 sctp_addip_noauth = 0;
1417 sctp_default_auto_asconf = 0;
1418
1419 /* Enable PR-SCTP by default. */
1420 sctp_prsctp_enable = 1;
1421
1422 /* Disable AUTH by default. */
1423 sctp_auth_enable = 0;
1424
1425 /* Set SCOPE policy to enabled */
1426 sctp_scope_policy = SCTP_SCOPE_POLICY_ENABLE;
1427
1428 /* Set the default rwnd update threshold */
1429 sctp_rwnd_upd_shift = SCTP_DEFAULT_RWND_SHIFT;
1430
1431 sctp_sysctl_register(); 1431 sctp_sysctl_register();
1432 1432
1433 INIT_LIST_HEAD(&sctp_address_families); 1433 INIT_LIST_HEAD(&sctp_address_families);