aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorKOVACS Krisztian <hidden@sch.bme.hu>2008-10-01 10:30:02 -0400
committerDavid S. Miller <davem@davemloft.net>2008-10-01 10:30:02 -0400
commitf5715aea4564f233767ea1d944b2637a5fd7cd2e (patch)
treee74e56e56dff19940ba3a5002355ba1bfc73f573 /include
parenta210d01ae3ee006b59e54e772a7f212486e0f021 (diff)
ipv4: Implement IP_TRANSPARENT socket option
This patch introduces the IP_TRANSPARENT socket option: enabling that will make the IPv4 routing omit the non-local source address check on output. Setting IP_TRANSPARENT requires NET_ADMIN capability. Signed-off-by: KOVACS Krisztian <hidden@sch.bme.hu> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/linux/in.h1
-rw-r--r--include/net/inet_sock.h3
-rw-r--r--include/net/inet_timewait_sock.h3
3 files changed, 5 insertions, 2 deletions
diff --git a/include/linux/in.h b/include/linux/in.h
index 4065313cd7e..db458beef19 100644
--- a/include/linux/in.h
+++ b/include/linux/in.h
@@ -75,6 +75,7 @@ struct in_addr {
75#define IP_IPSEC_POLICY 16 75#define IP_IPSEC_POLICY 16
76#define IP_XFRM_POLICY 17 76#define IP_XFRM_POLICY 17
77#define IP_PASSSEC 18 77#define IP_PASSSEC 18
78#define IP_TRANSPARENT 19
78 79
79/* BSD compatibility */ 80/* BSD compatibility */
80#define IP_RECVRETOPTS IP_RETOPTS 81#define IP_RECVRETOPTS IP_RETOPTS
diff --git a/include/net/inet_sock.h b/include/net/inet_sock.h
index 643e26be058..e97b66e2a9d 100644
--- a/include/net/inet_sock.h
+++ b/include/net/inet_sock.h
@@ -129,7 +129,8 @@ struct inet_sock {
129 is_icsk:1, 129 is_icsk:1,
130 freebind:1, 130 freebind:1,
131 hdrincl:1, 131 hdrincl:1,
132 mc_loop:1; 132 mc_loop:1,
133 transparent:1;
133 int mc_index; 134 int mc_index;
134 __be32 mc_addr; 135 __be32 mc_addr;
135 struct ip_mc_socklist *mc_list; 136 struct ip_mc_socklist *mc_list;
diff --git a/include/net/inet_timewait_sock.h b/include/net/inet_timewait_sock.h
index 91324908fcc..80e4977631b 100644
--- a/include/net/inet_timewait_sock.h
+++ b/include/net/inet_timewait_sock.h
@@ -128,7 +128,8 @@ struct inet_timewait_sock {
128 __be16 tw_dport; 128 __be16 tw_dport;
129 __u16 tw_num; 129 __u16 tw_num;
130 /* And these are ours. */ 130 /* And these are ours. */
131 __u8 tw_ipv6only:1; 131 __u8 tw_ipv6only:1,
132 tw_transparent:1;
132 /* 15 bits hole, try to pack */ 133 /* 15 bits hole, try to pack */
133 __u16 tw_ipv6_offset; 134 __u16 tw_ipv6_offset;
134 unsigned long tw_ttd; 135 unsigned long tw_ttd;