aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/inet_sock.h
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@vyatta.com>2010-01-11 19:28:01 -0500
committerDavid S. Miller <davem@davemloft.net>2010-01-11 19:28:01 -0500
commitd218d11133d888f9745802146a50255a4781d37a (patch)
tree3b4b163238e19c48f37f3d8a77eb27f3a18691a0 /include/net/inet_sock.h
parentc8e000604bce02a87742240a9b716a0f1b680c0b (diff)
tcp: Generalized TTL Security Mechanism
This patch adds the kernel portions needed to implement RFC 5082 Generalized TTL Security Mechanism (GTSM). It is a lightweight security measure against forged packets causing DoS attacks (for BGP). This is already implemented the same way in BSD kernels. For the necessary Quagga patch http://www.gossamer-threads.com/lists/quagga/dev/17389 Description from Cisco http://www.cisco.com/en/US/docs/ios/12_3t/12_3t7/feature/guide/gt_btsh.html It does add one byte to each socket structure, but I did a little rearrangement to reuse a hole (on 64 bit), but it does grow the structure on 32 bit This should be documented on ip(4) man page and the Glibc in.h file also needs update. IPV6_MINHOPLIMIT should also be added (although BSD doesn't support that). Only TCP is supported, but could also be added to UDP, DCCP, SCTP if desired. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/inet_sock.h')
-rw-r--r--include/net/inet_sock.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/net/inet_sock.h b/include/net/inet_sock.h
index bd4c53f75ac0..83fd34437cf1 100644
--- a/include/net/inet_sock.h
+++ b/include/net/inet_sock.h
@@ -122,10 +122,12 @@ struct inet_sock {
122 __be32 inet_saddr; 122 __be32 inet_saddr;
123 __s16 uc_ttl; 123 __s16 uc_ttl;
124 __u16 cmsg_flags; 124 __u16 cmsg_flags;
125 struct ip_options *opt;
126 __be16 inet_sport; 125 __be16 inet_sport;
127 __u16 inet_id; 126 __u16 inet_id;
127
128 struct ip_options *opt;
128 __u8 tos; 129 __u8 tos;
130 __u8 min_ttl;
129 __u8 mc_ttl; 131 __u8 mc_ttl;
130 __u8 pmtudisc; 132 __u8 pmtudisc;
131 __u8 recverr:1, 133 __u8 recverr:1,