2017-11-01 15:07:57 +01:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0 */
|
2008-01-10 02:49:06 -08:00
|
|
|
/*
|
|
|
|
|
* ipv6 in net namespaces
|
|
|
|
|
*/
|
|
|
|
|
|
2008-01-10 02:56:03 -08:00
|
|
|
#include <net/inet_frag.h>
|
|
|
|
|
|
2008-01-10 02:49:06 -08:00
|
|
|
#ifndef __NETNS_IPV6_H__
|
|
|
|
|
#define __NETNS_IPV6_H__
|
2009-08-29 01:34:49 +00:00
|
|
|
#include <net/dst_ops.h>
|
2019-04-17 16:35:49 -04:00
|
|
|
#include <uapi/linux/icmpv6.h>
|
2008-01-10 02:49:06 -08:00
|
|
|
|
2008-01-10 02:53:43 -08:00
|
|
|
struct ctl_table_header;
|
|
|
|
|
|
|
|
|
|
struct netns_sysctl_ipv6 {
|
|
|
|
|
#ifdef CONFIG_SYSCTL
|
2012-04-19 13:37:09 +00:00
|
|
|
struct ctl_table_header *hdr;
|
|
|
|
|
struct ctl_table_header *route_hdr;
|
|
|
|
|
struct ctl_table_header *icmp_hdr;
|
2008-01-22 06:08:36 -08:00
|
|
|
struct ctl_table_header *frags_hdr;
|
2013-02-06 10:46:33 +01:00
|
|
|
struct ctl_table_header *xfrm6_hdr;
|
2008-01-10 02:53:43 -08:00
|
|
|
#endif
|
2008-01-10 03:01:01 -08:00
|
|
|
int flush_delay;
|
|
|
|
|
int ip6_rt_max_size;
|
|
|
|
|
int ip6_rt_gc_min_interval;
|
|
|
|
|
int ip6_rt_gc_timeout;
|
|
|
|
|
int ip6_rt_gc_interval;
|
|
|
|
|
int ip6_rt_gc_elasticity;
|
|
|
|
|
int ip6_rt_mtu_expires;
|
|
|
|
|
int ip6_rt_min_advmss;
|
2021-05-17 21:15:22 +03:00
|
|
|
u32 multipath_hash_fields;
|
2021-03-31 10:52:12 -07:00
|
|
|
u8 multipath_hash_policy;
|
2026-01-15 09:41:34 +00:00
|
|
|
|
|
|
|
|
__cacheline_group_begin(sysctl_ipv6_flowlabel);
|
2021-03-31 10:52:12 -07:00
|
|
|
u8 flowlabel_consistency;
|
|
|
|
|
u8 auto_flowlabels;
|
2026-01-15 09:41:34 +00:00
|
|
|
u8 flowlabel_state_ranges;
|
|
|
|
|
__cacheline_group_end(sysctl_ipv6_flowlabel);
|
|
|
|
|
|
2021-03-31 10:52:12 -07:00
|
|
|
u8 icmpv6_echo_ignore_all;
|
|
|
|
|
u8 icmpv6_echo_ignore_multicast;
|
|
|
|
|
u8 icmpv6_echo_ignore_anycast;
|
2026-01-15 09:41:34 +00:00
|
|
|
int icmpv6_time;
|
2019-04-17 16:35:49 -04:00
|
|
|
DECLARE_BITMAP(icmpv6_ratemask, ICMPV6_MSG_MAX + 1);
|
|
|
|
|
unsigned long *icmpv6_ratemask_ptr;
|
2021-03-31 10:52:12 -07:00
|
|
|
u8 anycast_src_echo_reply;
|
2026-01-15 09:41:34 +00:00
|
|
|
u8 bindv6only;
|
2021-03-31 10:52:12 -07:00
|
|
|
u8 ip_nonlocal_bind;
|
|
|
|
|
u8 fwmark_reflect;
|
2015-03-23 23:36:05 +01:00
|
|
|
int idgen_retries;
|
|
|
|
|
int idgen_delay;
|
2017-08-23 09:55:41 +02:00
|
|
|
int flowlabel_reflect;
|
2017-10-30 14:16:00 -07:00
|
|
|
int max_dst_opts_cnt;
|
|
|
|
|
int max_hbh_opts_cnt;
|
|
|
|
|
int max_dst_opts_len;
|
|
|
|
|
int max_hbh_opts_len;
|
2018-04-24 20:23:16 +02:00
|
|
|
int seg6_flowlabel;
|
2021-07-20 21:42:57 +02:00
|
|
|
u32 ioam6_id;
|
|
|
|
|
u64 ioam6_id_wide;
|
2023-06-01 16:04:45 +00:00
|
|
|
u8 skip_notify_on_dev_down;
|
2021-03-31 10:52:12 -07:00
|
|
|
u8 fib_notify_on_flag_change;
|
2023-04-18 18:32:38 -07:00
|
|
|
u8 icmpv6_error_anycast_as_unicast;
|
2025-10-27 10:22:31 +02:00
|
|
|
u8 icmpv6_errors_extension_mask;
|
2008-01-10 02:53:43 -08:00
|
|
|
};
|
|
|
|
|
|
2008-01-10 02:49:06 -08:00
|
|
|
struct netns_ipv6 {
|
2021-03-31 10:52:13 -07:00
|
|
|
/* Keep ip6_dst_ops at the beginning of netns_sysctl_ipv6 */
|
|
|
|
|
struct dst_ops ip6_dst_ops;
|
|
|
|
|
|
2008-01-10 02:53:43 -08:00
|
|
|
struct netns_sysctl_ipv6 sysctl;
|
2008-01-10 17:42:55 -08:00
|
|
|
struct ipv6_devconf *devconf_all;
|
|
|
|
|
struct ipv6_devconf *devconf_dflt;
|
2012-06-08 01:20:41 +00:00
|
|
|
struct inet_peer_base *peers;
|
2019-05-24 09:03:39 -07:00
|
|
|
struct fqdir *fqdir;
|
2018-04-17 17:33:26 -07:00
|
|
|
struct fib6_info *fib6_null_entry;
|
2018-04-17 17:33:18 -07:00
|
|
|
struct rt6_info *ip6_null_entry;
|
2008-03-03 23:34:17 -08:00
|
|
|
struct rt6_statistics *rt6_stats;
|
2008-07-22 14:33:45 -07:00
|
|
|
struct timer_list ip6_fib_timer;
|
2008-03-03 23:25:27 -08:00
|
|
|
struct hlist_head *fib_table_hash;
|
2025-04-17 17:03:53 -07:00
|
|
|
spinlock_t fib_table_hash_lock;
|
2008-03-03 23:25:27 -08:00
|
|
|
struct fib6_table *fib6_main_tbl;
|
2016-03-08 14:44:35 +01:00
|
|
|
struct list_head fib6_walkers;
|
|
|
|
|
rwlock_t fib6_walker_lock;
|
2016-03-08 14:44:45 +01:00
|
|
|
spinlock_t fib6_gc_lock;
|
2022-04-13 11:13:33 -07:00
|
|
|
atomic_t ip6_rt_gc_expire;
|
|
|
|
|
unsigned long ip6_rt_last_gc;
|
2022-02-15 11:00:37 -05:00
|
|
|
unsigned char flowlabel_has_excl;
|
2008-03-03 23:25:27 -08:00
|
|
|
#ifdef CONFIG_IPV6_MULTIPLE_TABLES
|
2018-02-28 22:43:22 -05:00
|
|
|
bool fib6_has_custom_rules;
|
2022-02-15 11:00:37 -05:00
|
|
|
unsigned int fib6_rules_require_fldissect;
|
2019-11-20 13:47:34 +01:00
|
|
|
#ifdef CONFIG_IPV6_SUBTREES
|
|
|
|
|
unsigned int fib6_routes_require_src;
|
|
|
|
|
#endif
|
2008-03-04 13:48:30 -08:00
|
|
|
struct rt6_info *ip6_prohibit_entry;
|
|
|
|
|
struct rt6_info *ip6_blk_hole_entry;
|
2008-03-03 23:25:27 -08:00
|
|
|
struct fib6_table *fib6_local_tbl;
|
2008-03-03 23:33:08 -08:00
|
|
|
struct fib_rules_ops *fib6_rules_ops;
|
2008-01-31 04:04:13 -08:00
|
|
|
#endif
|
2008-03-07 11:15:34 -08:00
|
|
|
struct sock *ndisc_sk;
|
2008-03-07 11:16:02 -08:00
|
|
|
struct sock *tcp_sk;
|
2008-03-07 11:16:55 -08:00
|
|
|
struct sock *igmp_sk;
|
2015-02-25 09:58:35 -08:00
|
|
|
struct sock *mc_autojoin_sk;
|
2022-02-07 20:50:28 -08:00
|
|
|
|
|
|
|
|
struct hlist_head *inet6_addr_lst;
|
|
|
|
|
spinlock_t addrconf_hash_lock;
|
2022-02-07 20:50:29 -08:00
|
|
|
struct delayed_work addr_chk_work;
|
2022-02-07 20:50:28 -08:00
|
|
|
|
2008-12-10 16:07:08 -08:00
|
|
|
#ifdef CONFIG_IPV6_MROUTE
|
2010-05-11 14:40:55 +02:00
|
|
|
#ifndef CONFIG_IPV6_MROUTE_MULTIPLE_TABLES
|
2018-02-28 23:29:32 +02:00
|
|
|
struct mr_table *mrt6;
|
2010-05-11 14:40:55 +02:00
|
|
|
#else
|
|
|
|
|
struct list_head mr6_tables;
|
|
|
|
|
struct fib_rules_ops *mr6_rules_ops;
|
|
|
|
|
#endif
|
2008-12-10 16:07:08 -08:00
|
|
|
#endif
|
2013-03-22 06:28:43 +00:00
|
|
|
atomic_t dev_addr_genid;
|
2014-10-06 19:58:37 +02:00
|
|
|
atomic_t fib6_sernum;
|
2016-11-08 14:57:40 +01:00
|
|
|
struct seg6_pernet_data *seg6_data;
|
2017-08-03 13:28:16 +02:00
|
|
|
struct fib_notifier_ops *notifier_ops;
|
2018-03-26 15:01:34 +03:00
|
|
|
struct fib_notifier_ops *ip6mr_notifier_ops;
|
2026-02-28 22:17:31 +00:00
|
|
|
atomic_t ipmr_seq;
|
2026-05-06 16:24:16 +08:00
|
|
|
int flowlabel_count;
|
2017-09-19 16:27:06 -07:00
|
|
|
struct {
|
|
|
|
|
struct hlist_head head;
|
|
|
|
|
spinlock_t lock;
|
|
|
|
|
u32 seq;
|
|
|
|
|
} ip6addrlbl_table;
|
2021-07-20 21:42:57 +02:00
|
|
|
struct ioam6_pernet_data *ioam6_data;
|
2008-01-10 02:49:06 -08:00
|
|
|
};
|
2012-09-18 16:50:08 +00:00
|
|
|
|
|
|
|
|
#if IS_ENABLED(CONFIG_NF_DEFRAG_IPV6)
|
|
|
|
|
struct netns_nf_frag {
|
2019-05-24 09:03:39 -07:00
|
|
|
struct fqdir *fqdir;
|
2012-09-18 16:50:08 +00:00
|
|
|
};
|
|
|
|
|
#endif
|
|
|
|
|
|
2008-01-10 02:49:06 -08:00
|
|
|
#endif
|