summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorEric Leblond <eric@inl.fr>2007-02-07 15:10:09 -0800
committerDavid S. Miller <davem@sunset.davemloft.net>2007-02-08 12:39:17 -0800
commit41f4689a7c8cd76b77864461b3c58fde8f322b2c (patch)
tree29be7597bc02158ca41261f365ebcbd8047dd56f /include
parentcdd289a2f833b93e65b9a09a02c37f47a58140a8 (diff)
downloadkernel-crypto-41f4689a7c8cd76b77864461b3c58fde8f322b2c.tar.gz
kernel-crypto-41f4689a7c8cd76b77864461b3c58fde8f322b2c.tar.xz
kernel-crypto-41f4689a7c8cd76b77864461b3c58fde8f322b2c.zip
[NETFILTER]: NAT: optional source port randomization support
This patch adds support to NAT to randomize source ports. Signed-off-by: Eric Leblond <eric@inl.fr> Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/linux/netfilter_ipv4/ip_nat.h1
-rw-r--r--include/net/netfilter/nf_nat.h1
2 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/netfilter_ipv4/ip_nat.h b/include/linux/netfilter_ipv4/ip_nat.h
index bdf553620ca..bbca89aab81 100644
--- a/include/linux/netfilter_ipv4/ip_nat.h
+++ b/include/linux/netfilter_ipv4/ip_nat.h
@@ -16,6 +16,7 @@ enum ip_nat_manip_type
#define IP_NAT_RANGE_MAP_IPS 1
#define IP_NAT_RANGE_PROTO_SPECIFIED 2
+#define IP_NAT_RANGE_PROTO_RANDOM 4 /* add randomness to "port" selection */
/* NAT sequence number modifications */
struct ip_nat_seq {
diff --git a/include/net/netfilter/nf_nat.h b/include/net/netfilter/nf_nat.h
index 61c62068ca6..bc57dd7b9b5 100644
--- a/include/net/netfilter/nf_nat.h
+++ b/include/net/netfilter/nf_nat.h
@@ -16,6 +16,7 @@ enum nf_nat_manip_type
#define IP_NAT_RANGE_MAP_IPS 1
#define IP_NAT_RANGE_PROTO_SPECIFIED 2
+#define IP_NAT_RANGE_PROTO_RANDOM 4
/* NAT sequence number modifications */
struct nf_nat_seq {