blob: 10c9138160329885dd8dfb9ee0898a1009f660ab [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
2 * Linux INET6 implementation
3 *
4 * Authors:
5 * Pedro Roque <roque@di.fc.ul.pt>
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version
10 * 2 of the License, or (at your option) any later version.
11 */
12
13#ifndef _IP6_FIB_H
14#define _IP6_FIB_H
15
Linus Torvalds1da177e2005-04-16 15:20:36 -070016#include <linux/ipv6_route.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070017#include <linux/rtnetlink.h>
18#include <linux/spinlock.h>
Ido Schimmel16ab6d72017-08-03 13:28:16 +020019#include <linux/notifier.h>
Thomas Graf86872cb2006-08-22 00:01:08 -070020#include <net/dst.h>
21#include <net/flow.h>
22#include <net/netlink.h>
David S. Millerb3419362010-11-30 12:27:11 -080023#include <net/inetpeer.h>
Ido Schimmel16ab6d72017-08-03 13:28:16 +020024#include <net/fib_notifier.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070025
Neil Hormana33bc5c2009-07-30 18:52:15 -070026#ifdef CONFIG_IPV6_MULTIPLE_TABLES
27#define FIB6_TABLE_HASHSZ 256
28#else
29#define FIB6_TABLE_HASHSZ 1
30#endif
31
Wei Wangc757faa2017-10-06 12:06:01 -070032#define RT6_DEBUG 2
33
34#if RT6_DEBUG >= 3
35#define RT6_TRACE(x...) pr_debug(x)
36#else
37#define RT6_TRACE(x...) do { ; } while (0)
38#endif
39
Linus Torvalds1da177e2005-04-16 15:20:36 -070040struct rt6_info;
41
Eric Dumazetfd2c3ef2009-11-03 03:26:03 +000042struct fib6_config {
Thomas Graf86872cb2006-08-22 00:01:08 -070043 u32 fc_table;
44 u32 fc_metric;
45 int fc_dst_len;
46 int fc_src_len;
47 int fc_ifindex;
48 u32 fc_flags;
49 u32 fc_protocol;
David Ahern0ae81332017-02-02 12:37:08 -080050 u16 fc_type; /* only 8 bits are used */
51 u16 fc_delete_all_nh : 1,
52 __unused : 15;
Thomas Graf86872cb2006-08-22 00:01:08 -070053
54 struct in6_addr fc_dst;
55 struct in6_addr fc_src;
Daniel Walterc3968a82011-04-13 21:10:57 +000056 struct in6_addr fc_prefsrc;
Thomas Graf86872cb2006-08-22 00:01:08 -070057 struct in6_addr fc_gateway;
58
59 unsigned long fc_expires;
60 struct nlattr *fc_mx;
61 int fc_mx_len;
Nicolas Dichtel51ebd312012-10-22 03:42:09 +000062 int fc_mp_len;
63 struct nlattr *fc_mp;
Thomas Graf86872cb2006-08-22 00:01:08 -070064
65 struct nl_info fc_nlinfo;
Roopa Prabhu19e42e42015-07-21 10:43:48 +020066 struct nlattr *fc_encap;
67 u16 fc_encap_type;
Thomas Graf86872cb2006-08-22 00:01:08 -070068};
69
Eric Dumazetfd2c3ef2009-11-03 03:26:03 +000070struct fib6_node {
Wei Wang66f5d6c2017-10-06 12:06:10 -070071 struct fib6_node __rcu *parent;
72 struct fib6_node __rcu *left;
73 struct fib6_node __rcu *right;
Kim Nordlund8bce65b2006-12-13 16:38:29 -080074#ifdef CONFIG_IPV6_SUBTREES
Wei Wang66f5d6c2017-10-06 12:06:10 -070075 struct fib6_node __rcu *subtree;
Kim Nordlund8bce65b2006-12-13 16:38:29 -080076#endif
Wei Wang66f5d6c2017-10-06 12:06:10 -070077 struct rt6_info __rcu *leaf;
Linus Torvalds1da177e2005-04-16 15:20:36 -070078
79 __u16 fn_bit; /* bit key */
80 __u16 fn_flags;
Hannes Frederic Sowa42b18702014-10-06 19:58:35 +020081 int fn_sernum;
Wei Wang66f5d6c2017-10-06 12:06:10 -070082 struct rt6_info __rcu *rr_ptr;
Wei Wangc5cff852017-08-21 09:47:10 -070083 struct rcu_head rcu;
Linus Torvalds1da177e2005-04-16 15:20:36 -070084};
85
Wei Wangc757faa2017-10-06 12:06:01 -070086struct fib6_gc_args {
87 int timeout;
88 int more;
89};
90
YOSHIFUJI Hideaki7fc33162006-08-23 17:22:24 -070091#ifndef CONFIG_IPV6_SUBTREES
92#define FIB6_SUBTREE(fn) NULL
93#else
Wei Wang66f5d6c2017-10-06 12:06:10 -070094#define FIB6_SUBTREE(fn) (rcu_dereference_protected((fn)->subtree, 1))
YOSHIFUJI Hideaki7fc33162006-08-23 17:22:24 -070095#endif
Linus Torvalds1da177e2005-04-16 15:20:36 -070096
Florian Westphale715b6d2015-01-05 23:57:44 +010097struct mx6_config {
98 const u32 *mx;
99 DECLARE_BITMAP(mx_valid, RTAX_MAX);
100};
101
Linus Torvalds1da177e2005-04-16 15:20:36 -0700102/*
103 * routing information
104 *
105 */
106
Eric Dumazetfd2c3ef2009-11-03 03:26:03 +0000107struct rt6key {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700108 struct in6_addr addr;
109 int plen;
110};
111
Thomas Grafc71099a2006-08-04 23:20:06 -0700112struct fib6_table;
113
Wei Wang35732d02017-10-06 12:05:57 -0700114struct rt6_exception_bucket {
115 struct hlist_head chain;
116 int depth;
117};
118
119struct rt6_exception {
120 struct hlist_node hlist;
121 struct rt6_info *rt6i;
122 unsigned long stamp;
123 struct rcu_head rcu;
124};
125
126#define FIB6_EXCEPTION_BUCKET_SIZE_SHIFT 10
127#define FIB6_EXCEPTION_BUCKET_SIZE (1 << FIB6_EXCEPTION_BUCKET_SIZE_SHIFT)
128#define FIB6_MAX_DEPTH 5
129
Eric Dumazetfd2c3ef2009-11-03 03:26:03 +0000130struct rt6_info {
Changli Gaod8d1f302010-06-10 23:31:35 -0700131 struct dst_entry dst;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700132
YOSHIFUJI Hideaki / 吉藤英明bd2c77a2010-03-31 22:24:22 +0000133 /*
134 * Tail elements of dst_entry (__refcnt etc.)
135 * and these elements (rarely used in hot path) are in
136 * the same cache line.
137 */
138 struct fib6_table *rt6i_table;
Wei Wang4e587ea2017-08-25 15:03:10 -0700139 struct fib6_node __rcu *rt6i_node;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700140
141 struct in6_addr rt6i_gateway;
YOSHIFUJI Hideaki / 吉藤英明bd2c77a2010-03-31 22:24:22 +0000142
Nicolas Dichtel51ebd312012-10-22 03:42:09 +0000143 /* Multipath routes:
144 * siblings is a list of rt6_info that have the the same metric/weight,
145 * destination, but not the same gateway. nsiblings is just a cache
146 * to speed up lookup.
147 */
148 struct list_head rt6i_siblings;
149 unsigned int rt6i_nsiblings;
150
Linus Torvalds1da177e2005-04-16 15:20:36 -0700151 atomic_t rt6i_ref;
Herbert Xub4ce9272007-11-13 21:33:32 -0800152
Ido Schimmelfe400792017-08-15 09:09:49 +0200153 unsigned int rt6i_nh_flags;
154
YOSHIFUJI Hideaki / 吉藤英明bd2c77a2010-03-31 22:24:22 +0000155 /* These are in a separate cache line. */
156 struct rt6key rt6i_dst ____cacheline_aligned_in_smp;
157 u32 rt6i_flags;
158 struct rt6key rt6i_src;
Daniel Walterc3968a82011-04-13 21:10:57 +0000159 struct rt6key rt6i_prefsrc;
Herbert Xub4ce9272007-11-13 21:33:32 -0800160
Martin KaFai Lau8d0b94a2015-05-22 20:56:04 -0700161 struct list_head rt6i_uncached;
162 struct uncached_list *rt6i_uncached_list;
163
YOSHIFUJI Hideaki / 吉藤英明bd2c77a2010-03-31 22:24:22 +0000164 struct inet6_dev *rt6i_idev;
Martin KaFai Laud52d3992015-05-22 20:56:06 -0700165 struct rt6_info * __percpu *rt6i_pcpu;
Wei Wang35732d02017-10-06 12:05:57 -0700166 struct rt6_exception_bucket __rcu *rt6i_exception_bucket;
Noriaki TAKAMIYAa47ed4c2007-09-06 03:31:25 -0700167
Hannes Frederic Sowa705f1c82014-09-28 00:46:06 +0200168 u32 rt6i_metric;
Martin KaFai Lau4b32b5a2015-04-28 13:03:06 -0700169 u32 rt6i_pmtu;
YOSHIFUJI Hideaki / 吉藤英明bd2c77a2010-03-31 22:24:22 +0000170 /* more non-fragment space at head required */
171 unsigned short rt6i_nfheader_len;
YOSHIFUJI Hideaki / 吉藤英明bd2c77a2010-03-31 22:24:22 +0000172 u8 rt6i_protocol;
Wei Wang35732d02017-10-06 12:05:57 -0700173 u8 exception_bucket_flushed:1,
174 unused:7;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700175};
176
Wei Wang66f5d6c2017-10-06 12:06:10 -0700177#define for_each_fib6_node_rt_rcu(fn) \
178 for (rt = rcu_dereference((fn)->leaf); rt; \
179 rt = rcu_dereference(rt->dst.rt6_next))
180
181#define for_each_fib6_walker_rt(w) \
182 for (rt = (w)->leaf; rt; \
183 rt = rcu_dereference_protected(rt->dst.rt6_next, 1))
184
YOSHIFUJI Hideaki7a3025b2006-10-13 16:17:25 +0900185static inline struct inet6_dev *ip6_dst_idev(struct dst_entry *dst)
186{
187 return ((struct rt6_info *)dst)->rt6i_idev;
188}
189
Gao feng1716a962012-04-06 00:13:10 +0000190static inline void rt6_clean_expires(struct rt6_info *rt)
191{
Gao feng1716a962012-04-06 00:13:10 +0000192 rt->rt6i_flags &= ~RTF_EXPIRES;
Hannes Frederic Sowa01ba16d2013-10-24 10:14:27 +0200193 rt->dst.expires = 0;
Gao feng1716a962012-04-06 00:13:10 +0000194}
195
196static inline void rt6_set_expires(struct rt6_info *rt, unsigned long expires)
197{
Gao feng1716a962012-04-06 00:13:10 +0000198 rt->dst.expires = expires;
YOSHIFUJI Hideaki / 吉藤英明ecd98832013-02-20 00:29:08 +0000199 rt->rt6i_flags |= RTF_EXPIRES;
Gao feng1716a962012-04-06 00:13:10 +0000200}
201
YOSHIFUJI Hideaki / 吉藤英明ecd98832013-02-20 00:29:08 +0000202static inline void rt6_update_expires(struct rt6_info *rt0, int timeout)
Gao feng1716a962012-04-06 00:13:10 +0000203{
YOSHIFUJI Hideaki / 吉藤英明ecd98832013-02-20 00:29:08 +0000204 struct rt6_info *rt;
Gao feng1716a962012-04-06 00:13:10 +0000205
YOSHIFUJI Hideaki / 吉藤英明ecd98832013-02-20 00:29:08 +0000206 for (rt = rt0; rt && !(rt->rt6i_flags & RTF_EXPIRES);
207 rt = (struct rt6_info *)rt->dst.from);
208 if (rt && rt != rt0)
209 rt0->dst.expires = rt->dst.expires;
210
211 dst_set_expires(&rt0->dst, timeout);
212 rt0->rt6i_flags |= RTF_EXPIRES;
Gao feng1716a962012-04-06 00:13:10 +0000213}
214
Wei Wangc5cff852017-08-21 09:47:10 -0700215/* Function to safely get fn->sernum for passed in rt
216 * and store result in passed in cookie.
217 * Return true if we can get cookie safely
218 * Return false if not
219 */
220static inline bool rt6_get_cookie_safe(const struct rt6_info *rt,
221 u32 *cookie)
222{
223 struct fib6_node *fn;
224 bool status = false;
225
226 rcu_read_lock();
227 fn = rcu_dereference(rt->rt6i_node);
228
229 if (fn) {
230 *cookie = fn->fn_sernum;
Wei Wangbbd63f02017-10-06 12:06:07 -0700231 /* pairs with smp_wmb() in fib6_update_sernum_upto_root() */
232 smp_rmb();
Wei Wangc5cff852017-08-21 09:47:10 -0700233 status = true;
234 }
235
236 rcu_read_unlock();
237 return status;
238}
239
Martin KaFai Laub197df42015-05-22 20:56:01 -0700240static inline u32 rt6_get_cookie(const struct rt6_info *rt)
241{
Wei Wangc5cff852017-08-21 09:47:10 -0700242 u32 cookie = 0;
243
Martin KaFai Lau02bcf4e2015-11-11 11:51:08 -0800244 if (rt->rt6i_flags & RTF_PCPU ||
Wei Wanga4c2fd72017-06-17 10:42:42 -0700245 (unlikely(!list_empty(&rt->rt6i_uncached)) && rt->dst.from))
Martin KaFai Lau3da59bd2015-05-22 20:56:03 -0700246 rt = (struct rt6_info *)(rt->dst.from);
247
Wei Wangc5cff852017-08-21 09:47:10 -0700248 rt6_get_cookie_safe(rt, &cookie);
249
250 return cookie;
Martin KaFai Laub197df42015-05-22 20:56:01 -0700251}
252
Amerigo Wang94e187c2012-10-29 00:13:19 +0000253static inline void ip6_rt_put(struct rt6_info *rt)
254{
255 /* dst_release() accepts a NULL parameter.
256 * We rely on dst being first structure in struct rt6_info
257 */
258 BUILD_BUG_ON(offsetof(struct rt6_info, dst) != 0);
259 dst_release(&rt->dst);
260}
261
Ido Schimmela460aa82017-08-03 13:28:25 +0200262void rt6_free_pcpu(struct rt6_info *non_pcpu_rt);
263
264static inline void rt6_hold(struct rt6_info *rt)
265{
266 atomic_inc(&rt->rt6i_ref);
267}
268
269static inline void rt6_release(struct rt6_info *rt)
270{
271 if (atomic_dec_and_test(&rt->rt6i_ref)) {
272 rt6_free_pcpu(rt);
273 dst_dev_put(&rt->dst);
274 dst_release(&rt->dst);
275 }
276}
277
Hannes Frederic Sowa94b2cfe2014-10-06 19:58:34 +0200278enum fib6_walk_state {
279#ifdef CONFIG_IPV6_SUBTREES
280 FWS_S,
281#endif
282 FWS_L,
283 FWS_R,
284 FWS_C,
285 FWS_U
286};
287
288struct fib6_walker {
Alexey Dobriyanbbef49d2010-02-18 08:13:30 +0000289 struct list_head lh;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700290 struct fib6_node *root, *node;
291 struct rt6_info *leaf;
Hannes Frederic Sowa94b2cfe2014-10-06 19:58:34 +0200292 enum fib6_walk_state state;
Patrick McHardy2bec5a32010-02-08 05:19:03 +0000293 unsigned int skip;
294 unsigned int count;
Hannes Frederic Sowa94b2cfe2014-10-06 19:58:34 +0200295 int (*func)(struct fib6_walker *);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700296 void *args;
297};
298
Linus Torvalds1da177e2005-04-16 15:20:36 -0700299struct rt6_statistics {
Wei Wang81eb8442017-10-06 12:06:11 -0700300 __u32 fib_nodes; /* all fib6 nodes */
301 __u32 fib_route_nodes; /* intermediate nodes */
302 __u32 fib_rt_entries; /* rt entries in fib table */
303 __u32 fib_rt_cache; /* cached rt entries in exception table */
304 __u32 fib_discarded_routes; /* total number of routes delete */
305
306 /* The following stats are not protected by any lock */
307 atomic_t fib_rt_alloc; /* total number of routes alloced */
308 atomic_t fib_rt_uncache; /* rt entries in uncached list */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700309};
310
311#define RTN_TL_ROOT 0x0001
312#define RTN_ROOT 0x0002 /* tree root node */
313#define RTN_RTINFO 0x0004 /* node with valid routing info */
314
315/*
316 * priority levels (or metrics)
317 *
318 */
319
Linus Torvalds1da177e2005-04-16 15:20:36 -0700320
Thomas Grafc71099a2006-08-04 23:20:06 -0700321struct fib6_table {
322 struct hlist_node tb6_hlist;
323 u32 tb6_id;
Wei Wang66f5d6c2017-10-06 12:06:10 -0700324 spinlock_t tb6_lock;
Thomas Grafc71099a2006-08-04 23:20:06 -0700325 struct fib6_node tb6_root;
David S. Miller8e773272012-06-11 00:01:52 -0700326 struct inet_peer_base tb6_peers;
David Ahern830218c2016-10-24 10:52:35 -0700327 unsigned int flags;
Ido Schimmele1ee0a52017-08-03 13:28:19 +0200328 unsigned int fib_seq;
David Ahern830218c2016-10-24 10:52:35 -0700329#define RT6_TABLE_HAS_DFLT_ROUTER BIT(0)
Thomas Grafc71099a2006-08-04 23:20:06 -0700330};
331
332#define RT6_TABLE_UNSPEC RT_TABLE_UNSPEC
333#define RT6_TABLE_MAIN RT_TABLE_MAIN
Thomas Grafc71099a2006-08-04 23:20:06 -0700334#define RT6_TABLE_DFLT RT6_TABLE_MAIN
335#define RT6_TABLE_INFO RT6_TABLE_MAIN
336#define RT6_TABLE_PREFIX RT6_TABLE_MAIN
337
338#ifdef CONFIG_IPV6_MULTIPLE_TABLES
339#define FIB6_TABLE_MIN 1
340#define FIB6_TABLE_MAX RT_TABLE_MAX
Thomas Graf101367c2006-08-04 03:39:02 -0700341#define RT6_TABLE_LOCAL RT_TABLE_LOCAL
Thomas Grafc71099a2006-08-04 23:20:06 -0700342#else
343#define FIB6_TABLE_MIN RT_TABLE_MAIN
344#define FIB6_TABLE_MAX FIB6_TABLE_MIN
Thomas Graf101367c2006-08-04 03:39:02 -0700345#define RT6_TABLE_LOCAL RT6_TABLE_MAIN
Thomas Grafc71099a2006-08-04 23:20:06 -0700346#endif
347
Daniel Lezcano8ed67782008-03-04 13:48:30 -0800348typedef struct rt6_info *(*pol_lookup_t)(struct net *,
349 struct fib6_table *,
David S. Miller4c9483b2011-03-12 16:22:43 -0500350 struct flowi6 *, int);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700351
Ido Schimmeldf77fe42017-08-03 13:28:17 +0200352struct fib6_entry_notifier_info {
353 struct fib_notifier_info info; /* must be first */
354 struct rt6_info *rt;
355};
356
Linus Torvalds1da177e2005-04-16 15:20:36 -0700357/*
358 * exported functions
359 */
360
Joe Perches5c3a0fd2013-09-21 10:22:42 -0700361struct fib6_table *fib6_get_table(struct net *net, u32 id);
362struct fib6_table *fib6_new_table(struct net *net, u32 id);
363struct dst_entry *fib6_rule_lookup(struct net *net, struct flowi6 *fl6,
364 int flags, pol_lookup_t lookup);
Thomas Grafc71099a2006-08-04 23:20:06 -0700365
Joe Perches5c3a0fd2013-09-21 10:22:42 -0700366struct fib6_node *fib6_lookup(struct fib6_node *root,
367 const struct in6_addr *daddr,
368 const struct in6_addr *saddr);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700369
Joe Perches5c3a0fd2013-09-21 10:22:42 -0700370struct fib6_node *fib6_locate(struct fib6_node *root,
371 const struct in6_addr *daddr, int dst_len,
Wei Wang38fbeee2017-10-06 12:06:02 -0700372 const struct in6_addr *saddr, int src_len,
373 bool exact_match);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700374
Joe Perches5c3a0fd2013-09-21 10:22:42 -0700375void fib6_clean_all(struct net *net, int (*func)(struct rt6_info *, void *arg),
Li RongQing0c3584d2013-12-27 16:32:38 +0800376 void *arg);
Thomas Grafc71099a2006-08-04 23:20:06 -0700377
Florian Westphale715b6d2015-01-05 23:57:44 +0100378int fib6_add(struct fib6_node *root, struct rt6_info *rt,
David Ahern333c4302017-05-21 10:12:04 -0600379 struct nl_info *info, struct mx6_config *mxc,
380 struct netlink_ext_ack *extack);
Joe Perches5c3a0fd2013-09-21 10:22:42 -0700381int fib6_del(struct rt6_info *rt, struct nl_info *info);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700382
Roopa Prabhu37a1d362015-09-13 10:18:33 -0700383void inet6_rt_notify(int event, struct rt6_info *rt, struct nl_info *info,
384 unsigned int flags);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700385
Joe Perches5c3a0fd2013-09-21 10:22:42 -0700386void fib6_run_gc(unsigned long expires, struct net *net, bool force);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700387
Joe Perches5c3a0fd2013-09-21 10:22:42 -0700388void fib6_gc_cleanup(void);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700389
Joe Perches5c3a0fd2013-09-21 10:22:42 -0700390int fib6_init(void);
Thomas Graf101367c2006-08-04 03:39:02 -0700391
Hannes Frederic Sowa8d2ca1d2013-09-21 16:55:59 +0200392int ipv6_route_open(struct inode *inode, struct file *file);
393
Ido Schimmel16ab6d72017-08-03 13:28:16 +0200394int call_fib6_notifier(struct notifier_block *nb, struct net *net,
395 enum fib_event_type event_type,
396 struct fib_notifier_info *info);
397int call_fib6_notifiers(struct net *net, enum fib_event_type event_type,
398 struct fib_notifier_info *info);
399
400int __net_init fib6_notifier_init(struct net *net);
401void __net_exit fib6_notifier_exit(struct net *net);
402
Ido Schimmele1ee0a52017-08-03 13:28:19 +0200403unsigned int fib6_tables_seq_read(struct net *net);
404int fib6_tables_dump(struct net *net, struct notifier_block *nb);
405
Wei Wang180ca442017-10-06 12:05:56 -0700406void fib6_update_sernum(struct rt6_info *rt);
407
Daniel Lezcano7e5449c2007-12-08 00:14:54 -0800408#ifdef CONFIG_IPV6_MULTIPLE_TABLES
Joe Perches5c3a0fd2013-09-21 10:22:42 -0700409int fib6_rules_init(void);
410void fib6_rules_cleanup(void);
Ido Schimmele3ea9732017-08-03 13:28:15 +0200411bool fib6_rule_default(const struct fib_rule *rule);
Ido Schimmeldcb18f72017-08-03 13:28:18 +0200412int fib6_rules_dump(struct net *net, struct notifier_block *nb);
413unsigned int fib6_rules_seq_read(struct net *net);
Daniel Lezcano7e5449c2007-12-08 00:14:54 -0800414#else
415static inline int fib6_rules_init(void)
416{
417 return 0;
418}
419static inline void fib6_rules_cleanup(void)
420{
421 return ;
422}
Ido Schimmele3ea9732017-08-03 13:28:15 +0200423static inline bool fib6_rule_default(const struct fib_rule *rule)
424{
425 return true;
426}
Ido Schimmeldcb18f72017-08-03 13:28:18 +0200427static inline int fib6_rules_dump(struct net *net, struct notifier_block *nb)
428{
429 return 0;
430}
431static inline unsigned int fib6_rules_seq_read(struct net *net)
432{
433 return 0;
434}
Daniel Lezcano7e5449c2007-12-08 00:14:54 -0800435#endif
Linus Torvalds1da177e2005-04-16 15:20:36 -0700436#endif