diff options
author | Bhaskar Dutta <bhaskie@gmail.com> | 2009-09-03 07:55:47 -0400 |
---|---|---|
committer | Vlad Yasevich <vladislav.yasevich@hp.com> | 2009-09-04 18:21:01 -0400 |
commit | 723884339f90a9c420783135168cc1045750eb5d (patch) | |
tree | c8538602e56f2310470b0970bf121a1000313401 /include/net/sctp/constants.h | |
parent | 8da645e101a8c20c6073efda3c7cc74eec01b87f (diff) |
sctp: Sysctl configuration for IPv4 Address Scoping
This patch introduces a new sysctl option to make IPv4 Address Scoping
configurable <draft-stewart-tsvwg-sctp-ipv4-00.txt>.
In networking environments where DNAT rules in iptables prerouting
chains convert destination IP's to link-local/private IP addresses,
SCTP connections fail to establish as the INIT chunk is dropped by the
kernel due to address scope match failure.
For example to support overlapping IP addresses (same IP address with
different vlan id) a Layer-5 application listens on link local IP's,
and there is a DNAT rule that maps the destination IP to a link local
IP. Such applications never get the SCTP INIT if the address-scoping
draft is strictly followed.
This sysctl configuration allows SCTP to function in such
unconventional networking environments.
Sysctl options:
0 - Disable IPv4 address scoping draft altogether
1 - Enable IPv4 address scoping (default, current behavior)
2 - Enable address scoping but allow IPv4 private addresses in init/init-ack
3 - Enable address scoping but allow IPv4 link local address in init/init-ack
Signed-off-by: Bhaskar Dutta <bhaskar.dutta@globallogic.com>
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Diffstat (limited to 'include/net/sctp/constants.h')
-rw-r--r-- | include/net/sctp/constants.h | 7 |
1 files changed, 7 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 | ||
366 | typedef 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. |