aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/net/sctp/constants.h7
-rw-r--r--include/net/sctp/structs.h10
2 files changed, 17 insertions, 0 deletions
diff --git a/include/net/sctp/constants.h b/include/net/sctp/constants.h
index af8c1508109e..58f714a3b670 100644
--- a/include/net/sctp/constants.h
+++ b/include/net/sctp/constants.h
@@ -363,6 +363,13 @@ typedef enum {
363 SCTP_SCOPE_UNUSABLE, /* IPv4 unusable addresses */ 363 SCTP_SCOPE_UNUSABLE, /* IPv4 unusable addresses */
364} sctp_scope_t; 364} sctp_scope_t;
365 365
366typedef enum {
367 SCTP_SCOPE_POLICY_DISABLE, /* Disable IPv4 address scoping */
368 SCTP_SCOPE_POLICY_ENABLE, /* Enable IPv4 address scoping */
369 SCTP_SCOPE_POLICY_PRIVATE, /* Follow draft but allow IPv4 private addresses */
370 SCTP_SCOPE_POLICY_LINK, /* Follow draft but allow IPv4 link local addresses */
371} sctp_scope_policy_t;
372
366/* Based on IPv4 scoping <draft-stewart-tsvwg-sctp-ipv4-00.txt>, 373/* Based on IPv4 scoping <draft-stewart-tsvwg-sctp-ipv4-00.txt>,
367 * SCTP IPv4 unusable addresses: 0.0.0.0/8, 224.0.0.0/4, 198.18.0.0/24, 374 * SCTP IPv4 unusable addresses: 0.0.0.0/8, 224.0.0.0/4, 198.18.0.0/24,
368 * 192.88.99.0/24. 375 * 192.88.99.0/24.
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
index 993cfff9218e..a48d80e77cd7 100644
--- a/include/net/sctp/structs.h
+++ b/include/net/sctp/structs.h
@@ -219,6 +219,15 @@ extern struct sctp_globals {
219 /* Flag to idicate if SCTP-AUTH is enabled */ 219 /* Flag to idicate if SCTP-AUTH is enabled */
220 int auth_enable; 220 int auth_enable;
221 221
222 /*
223 * Policy to control SCTP IPv4 address scoping
224 * 0 - Disable IPv4 address scoping
225 * 1 - Enable IPv4 address scoping
226 * 2 - Selectively allow only IPv4 private addresses
227 * 3 - Selectively allow only IPv4 link local address
228 */
229 int ipv4_scope_policy;
230
222 /* Flag to indicate whether computing and verifying checksum 231 /* Flag to indicate whether computing and verifying checksum
223 * is disabled. */ 232 * is disabled. */
224 int checksum_disable; 233 int checksum_disable;
@@ -252,6 +261,7 @@ extern struct sctp_globals {
252#define sctp_port_hashtable (sctp_globals.port_hashtable) 261#define sctp_port_hashtable (sctp_globals.port_hashtable)
253#define sctp_local_addr_list (sctp_globals.local_addr_list) 262#define sctp_local_addr_list (sctp_globals.local_addr_list)
254#define sctp_local_addr_lock (sctp_globals.addr_list_lock) 263#define sctp_local_addr_lock (sctp_globals.addr_list_lock)
264#define sctp_scope_policy (sctp_globals.ipv4_scope_policy)
255#define sctp_addip_enable (sctp_globals.addip_enable) 265#define sctp_addip_enable (sctp_globals.addip_enable)
256#define sctp_addip_noauth (sctp_globals.addip_noauth_enable) 266#define sctp_addip_noauth (sctp_globals.addip_noauth_enable)
257#define sctp_prsctp_enable (sctp_globals.prsctp_enable) 267#define sctp_prsctp_enable (sctp_globals.prsctp_enable)