Daniel Lezcano | b0f159d | 2008-01-10 02:49:06 -0800 | [diff] [blame] | 1 | /* |
| 2 | * ipv6 in net namespaces |
| 3 | */ |
| 4 | |
Daniel Lezcano | e71e034 | 2008-01-10 02:56:03 -0800 | [diff] [blame] | 5 | #include <net/inet_frag.h> |
| 6 | |
Daniel Lezcano | b0f159d | 2008-01-10 02:49:06 -0800 | [diff] [blame] | 7 | #ifndef __NETNS_IPV6_H__ |
| 8 | #define __NETNS_IPV6_H__ |
Alexey Dobriyan | 86393e5 | 2009-08-29 01:34:49 +0000 | [diff] [blame] | 9 | #include <net/dst_ops.h> |
Daniel Lezcano | b0f159d | 2008-01-10 02:49:06 -0800 | [diff] [blame] | 10 | |
Daniel Lezcano | 760f2d0 | 2008-01-10 02:53:43 -0800 | [diff] [blame] | 11 | struct ctl_table_header; |
| 12 | |
| 13 | struct netns_sysctl_ipv6 { |
| 14 | #ifdef CONFIG_SYSCTL |
Eric W. Biederman | 6dceb03 | 2012-04-19 13:37:09 +0000 | [diff] [blame] | 15 | struct ctl_table_header *hdr; |
| 16 | struct ctl_table_header *route_hdr; |
| 17 | struct ctl_table_header *icmp_hdr; |
Pavel Emelyanov | e4a2d5c | 2008-01-22 06:08:36 -0800 | [diff] [blame] | 18 | struct ctl_table_header *frags_hdr; |
Michal Kubecek | 8d06887 | 2013-02-06 10:46:33 +0100 | [diff] [blame] | 19 | struct ctl_table_header *xfrm6_hdr; |
Daniel Lezcano | 760f2d0 | 2008-01-10 02:53:43 -0800 | [diff] [blame] | 20 | #endif |
Daniel Lezcano | 99bc9c4 | 2008-01-10 02:54:53 -0800 | [diff] [blame] | 21 | int bindv6only; |
Daniel Lezcano | 4990509 | 2008-01-10 03:01:01 -0800 | [diff] [blame] | 22 | int flush_delay; |
| 23 | int ip6_rt_max_size; |
| 24 | int ip6_rt_gc_min_interval; |
| 25 | int ip6_rt_gc_timeout; |
| 26 | int ip6_rt_gc_interval; |
| 27 | int ip6_rt_gc_elasticity; |
| 28 | int ip6_rt_mtu_expires; |
| 29 | int ip6_rt_min_advmss; |
Florent Fourcot | 6444f72 | 2014-01-17 17:15:05 +0100 | [diff] [blame] | 30 | int flowlabel_consistency; |
Tom Herbert | cb1ce2e | 2014-07-01 21:33:10 -0700 | [diff] [blame] | 31 | int auto_flowlabels; |
Daniel Lezcano | 41a7690 | 2008-01-10 03:02:40 -0800 | [diff] [blame] | 32 | int icmpv6_time; |
FX Le Bail | ec35b61 | 2014-01-13 15:59:01 +0100 | [diff] [blame] | 33 | int anycast_src_echo_reply; |
Tom Herbert | 35a256f | 2015-07-08 16:58:22 -0700 | [diff] [blame] | 34 | int ip_nonlocal_bind; |
Lorenzo Colitti | e110861 | 2014-05-13 10:17:33 -0700 | [diff] [blame] | 35 | int fwmark_reflect; |
Hannes Frederic Sowa | 1855b7c | 2015-03-23 23:36:05 +0100 | [diff] [blame] | 36 | int idgen_retries; |
| 37 | int idgen_delay; |
Tom Herbert | 82a584b | 2015-04-29 15:33:21 -0700 | [diff] [blame] | 38 | int flowlabel_state_ranges; |
Daniel Lezcano | 760f2d0 | 2008-01-10 02:53:43 -0800 | [diff] [blame] | 39 | }; |
| 40 | |
Daniel Lezcano | b0f159d | 2008-01-10 02:49:06 -0800 | [diff] [blame] | 41 | struct netns_ipv6 { |
Daniel Lezcano | 760f2d0 | 2008-01-10 02:53:43 -0800 | [diff] [blame] | 42 | struct netns_sysctl_ipv6 sysctl; |
Pavel Emelyanov | e0da5a4 | 2008-01-10 17:42:55 -0800 | [diff] [blame] | 43 | struct ipv6_devconf *devconf_all; |
| 44 | struct ipv6_devconf *devconf_dflt; |
Gao feng | c8a627e | 2012-06-08 01:20:41 +0000 | [diff] [blame] | 45 | struct inet_peer_base *peers; |
Pavel Emelyanov | ac18e75 | 2008-01-22 06:02:14 -0800 | [diff] [blame] | 46 | struct netns_frags frags; |
Alexey Dobriyan | 8280aa6 | 2008-01-31 04:04:13 -0800 | [diff] [blame] | 47 | #ifdef CONFIG_NETFILTER |
| 48 | struct xt_table *ip6table_filter; |
| 49 | struct xt_table *ip6table_mangle; |
| 50 | struct xt_table *ip6table_raw; |
Alexey Dobriyan | e9d3897 | 2010-01-18 08:08:37 +0100 | [diff] [blame] | 51 | #ifdef CONFIG_SECURITY |
James Morris | 17e6e59 | 2008-06-09 15:58:05 -0700 | [diff] [blame] | 52 | struct xt_table *ip6table_security; |
Alexey Dobriyan | 8280aa6 | 2008-01-31 04:04:13 -0800 | [diff] [blame] | 53 | #endif |
Patrick McHardy | 58a317f | 2012-08-26 19:14:12 +0200 | [diff] [blame] | 54 | struct xt_table *ip6table_nat; |
Alexey Dobriyan | e9d3897 | 2010-01-18 08:08:37 +0100 | [diff] [blame] | 55 | #endif |
Daniel Lezcano | 8ed6778 | 2008-03-04 13:48:30 -0800 | [diff] [blame] | 56 | struct rt6_info *ip6_null_entry; |
Benjamin Thery | c572872 | 2008-03-03 23:34:17 -0800 | [diff] [blame] | 57 | struct rt6_statistics *rt6_stats; |
Stephen Hemminger | 417f28b | 2008-07-22 14:33:45 -0700 | [diff] [blame] | 58 | struct timer_list ip6_fib_timer; |
Daniel Lezcano | 58f09b7 | 2008-03-03 23:25:27 -0800 | [diff] [blame] | 59 | struct hlist_head *fib_table_hash; |
| 60 | struct fib6_table *fib6_main_tbl; |
Michal Kubeček | 9a03cd8 | 2016-03-08 14:44:35 +0100 | [diff] [blame] | 61 | struct list_head fib6_walkers; |
Alexey Dobriyan | 86393e5 | 2009-08-29 01:34:49 +0000 | [diff] [blame] | 62 | struct dst_ops ip6_dst_ops; |
Michal Kubeček | 9a03cd8 | 2016-03-08 14:44:35 +0100 | [diff] [blame] | 63 | rwlock_t fib6_walker_lock; |
Michal Kubeček | 3dc94f9 | 2016-03-08 14:44:45 +0100 | [diff] [blame] | 64 | spinlock_t fib6_gc_lock; |
Benjamin Thery | 6891a34 | 2008-03-04 13:49:47 -0800 | [diff] [blame] | 65 | unsigned int ip6_rt_gc_expire; |
| 66 | unsigned long ip6_rt_last_gc; |
Daniel Lezcano | 58f09b7 | 2008-03-03 23:25:27 -0800 | [diff] [blame] | 67 | #ifdef CONFIG_IPV6_MULTIPLE_TABLES |
Daniel Lezcano | 8ed6778 | 2008-03-04 13:48:30 -0800 | [diff] [blame] | 68 | struct rt6_info *ip6_prohibit_entry; |
| 69 | struct rt6_info *ip6_blk_hole_entry; |
Daniel Lezcano | 58f09b7 | 2008-03-03 23:25:27 -0800 | [diff] [blame] | 70 | struct fib6_table *fib6_local_tbl; |
Daniel Lezcano | dcabb81 | 2008-03-03 23:33:08 -0800 | [diff] [blame] | 71 | struct fib_rules_ops *fib6_rules_ops; |
Daniel Lezcano | 58f09b7 | 2008-03-03 23:25:27 -0800 | [diff] [blame] | 72 | #endif |
Denis V. Lunev | 98c6d1b | 2008-02-29 11:21:22 -0800 | [diff] [blame] | 73 | struct sock **icmp_sk; |
Daniel Lezcano | 1762f7e | 2008-03-07 11:15:34 -0800 | [diff] [blame] | 74 | struct sock *ndisc_sk; |
Daniel Lezcano | 93ec926 | 2008-03-07 11:16:02 -0800 | [diff] [blame] | 75 | struct sock *tcp_sk; |
Daniel Lezcano | b8ad0cb | 2008-03-07 11:16:55 -0800 | [diff] [blame] | 76 | struct sock *igmp_sk; |
Madhu Challa | 93a714d | 2015-02-25 09:58:35 -0800 | [diff] [blame] | 77 | struct sock *mc_autojoin_sk; |
Benjamin Thery | bd91b8b | 2008-12-10 16:07:08 -0800 | [diff] [blame] | 78 | #ifdef CONFIG_IPV6_MROUTE |
Patrick McHardy | d1db275 | 2010-05-11 14:40:55 +0200 | [diff] [blame] | 79 | #ifndef CONFIG_IPV6_MROUTE_MULTIPLE_TABLES |
Patrick McHardy | 6bd5214 | 2010-05-11 14:40:53 +0200 | [diff] [blame] | 80 | struct mr6_table *mrt6; |
Patrick McHardy | d1db275 | 2010-05-11 14:40:55 +0200 | [diff] [blame] | 81 | #else |
| 82 | struct list_head mr6_tables; |
| 83 | struct fib_rules_ops *mr6_rules_ops; |
| 84 | #endif |
Benjamin Thery | bd91b8b | 2008-12-10 16:07:08 -0800 | [diff] [blame] | 85 | #endif |
Nicolas Dichtel | 63998ac | 2013-03-22 06:28:43 +0000 | [diff] [blame] | 86 | atomic_t dev_addr_genid; |
Hannes Frederic Sowa | 812918c | 2014-10-06 19:58:37 +0200 | [diff] [blame] | 87 | atomic_t fib6_sernum; |
David Lebrun | 915d7e5 | 2016-11-08 14:57:40 +0100 | [diff] [blame] | 88 | struct seg6_pernet_data *seg6_data; |
Daniel Lezcano | b0f159d | 2008-01-10 02:49:06 -0800 | [diff] [blame] | 89 | }; |
Amerigo Wang | c038a76 | 2012-09-18 16:50:08 +0000 | [diff] [blame] | 90 | |
| 91 | #if IS_ENABLED(CONFIG_NF_DEFRAG_IPV6) |
| 92 | struct netns_nf_frag { |
| 93 | struct netns_sysctl_ipv6 sysctl; |
| 94 | struct netns_frags frags; |
| 95 | }; |
| 96 | #endif |
| 97 | |
Daniel Lezcano | b0f159d | 2008-01-10 02:49:06 -0800 | [diff] [blame] | 98 | #endif |