Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   1) /* SPDX-License-Identifier: GPL-2.0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   2) #ifndef __NET_FIB_RULES_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   3) #define __NET_FIB_RULES_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   4) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   5) #include <linux/types.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   6) #include <linux/slab.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   7) #include <linux/netdevice.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   8) #include <linux/fib_rules.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   9) #include <linux/refcount.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  10) #include <net/flow.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  11) #include <net/rtnetlink.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  12) #include <net/fib_notifier.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  13) #include <linux/indirect_call_wrapper.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  14) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  15) struct fib_kuid_range {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  16) 	kuid_t start;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  17) 	kuid_t end;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  18) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  19) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  20) struct fib_rule {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  21) 	struct list_head	list;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  22) 	int			iifindex;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  23) 	int			oifindex;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  24) 	u32			mark;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  25) 	u32			mark_mask;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  26) 	u32			flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  27) 	u32			table;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  28) 	u8			action;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  29) 	u8			l3mdev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  30) 	u8                      proto;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  31) 	u8			ip_proto;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  32) 	u32			target;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  33) 	__be64			tun_id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  34) 	struct fib_rule __rcu	*ctarget;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  35) 	struct net		*fr_net;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  36) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  37) 	refcount_t		refcnt;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  38) 	u32			pref;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  39) 	int			suppress_ifgroup;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  40) 	int			suppress_prefixlen;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  41) 	char			iifname[IFNAMSIZ];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  42) 	char			oifname[IFNAMSIZ];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  43) 	struct fib_kuid_range	uid_range;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  44) 	struct fib_rule_port_range	sport_range;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  45) 	struct fib_rule_port_range	dport_range;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  46) 	struct rcu_head		rcu;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  47) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  48) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  49) struct fib_lookup_arg {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  50) 	void			*lookup_ptr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  51) 	const void		*lookup_data;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  52) 	void			*result;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  53) 	struct fib_rule		*rule;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  54) 	u32			table;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  55) 	int			flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  56) #define FIB_LOOKUP_NOREF		1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  57) #define FIB_LOOKUP_IGNORE_LINKSTATE	2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  58) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  59) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  60) struct fib_rules_ops {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  61) 	int			family;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  62) 	struct list_head	list;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  63) 	int			rule_size;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  64) 	int			addr_size;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  65) 	int			unresolved_rules;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  66) 	int			nr_goto_rules;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  67) 	unsigned int		fib_rules_seq;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  68) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  69) 	int			(*action)(struct fib_rule *,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  70) 					  struct flowi *, int,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  71) 					  struct fib_lookup_arg *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  72) 	/* __GENKSYMS__ hack to preserve the abi change that happened in
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  73) 	 * cdef485217d3 ("ipv6: fix memory leak in fib6_rule_suppress")
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  74) 	 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  75) #ifdef __GENKSYMS__
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  76) 	bool			(*suppress)(struct fib_rule *,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  77) #else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  78) 	bool			(*suppress)(struct fib_rule *, int,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  79) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  80) 					    struct fib_lookup_arg *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  81) 	int			(*match)(struct fib_rule *,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  82) 					 struct flowi *, int);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  83) 	int			(*configure)(struct fib_rule *,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  84) 					     struct sk_buff *,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  85) 					     struct fib_rule_hdr *,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  86) 					     struct nlattr **,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  87) 					     struct netlink_ext_ack *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  88) 	int			(*delete)(struct fib_rule *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  89) 	int			(*compare)(struct fib_rule *,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  90) 					   struct fib_rule_hdr *,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  91) 					   struct nlattr **);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  92) 	int			(*fill)(struct fib_rule *, struct sk_buff *,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  93) 					struct fib_rule_hdr *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  94) 	size_t			(*nlmsg_payload)(struct fib_rule *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  95) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  96) 	/* Called after modifications to the rules set, must flush
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  97) 	 * the route cache if one exists. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  98) 	void			(*flush_cache)(struct fib_rules_ops *ops);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  99) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) 	int			nlgroup;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) 	const struct nla_policy	*policy;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) 	struct list_head	rules_list;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) 	struct module		*owner;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) 	struct net		*fro_net;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) 	struct rcu_head		rcu;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) struct fib_rule_notifier_info {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) 	struct fib_notifier_info info; /* must be first */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) 	struct fib_rule *rule;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) #define FRA_GENERIC_POLICY \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) 	[FRA_UNSPEC]	= { .strict_start_type = FRA_DPORT_RANGE + 1 }, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) 	[FRA_IIFNAME]	= { .type = NLA_STRING, .len = IFNAMSIZ - 1 }, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) 	[FRA_OIFNAME]	= { .type = NLA_STRING, .len = IFNAMSIZ - 1 }, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) 	[FRA_PRIORITY]	= { .type = NLA_U32 }, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) 	[FRA_FWMARK]	= { .type = NLA_U32 }, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) 	[FRA_TUN_ID]	= { .type = NLA_U64 }, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) 	[FRA_FWMASK]	= { .type = NLA_U32 }, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) 	[FRA_TABLE]     = { .type = NLA_U32 }, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) 	[FRA_SUPPRESS_PREFIXLEN] = { .type = NLA_U32 }, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) 	[FRA_SUPPRESS_IFGROUP] = { .type = NLA_U32 }, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) 	[FRA_GOTO]	= { .type = NLA_U32 }, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) 	[FRA_L3MDEV]	= { .type = NLA_U8 }, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) 	[FRA_UID_RANGE]	= { .len = sizeof(struct fib_rule_uid_range) }, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) 	[FRA_PROTOCOL]  = { .type = NLA_U8 }, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) 	[FRA_IP_PROTO]  = { .type = NLA_U8 }, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) 	[FRA_SPORT_RANGE] = { .len = sizeof(struct fib_rule_port_range) }, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) 	[FRA_DPORT_RANGE] = { .len = sizeof(struct fib_rule_port_range) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) static inline void fib_rule_get(struct fib_rule *rule)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) 	refcount_inc(&rule->refcnt);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) static inline void fib_rule_put(struct fib_rule *rule)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) 	if (refcount_dec_and_test(&rule->refcnt))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) 		kfree_rcu(rule, rcu);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) #ifdef CONFIG_NET_L3_MASTER_DEV
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) static inline u32 fib_rule_get_table(struct fib_rule *rule,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) 				     struct fib_lookup_arg *arg)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) 	return rule->l3mdev ? arg->table : rule->table;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) #else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) static inline u32 fib_rule_get_table(struct fib_rule *rule,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) 				     struct fib_lookup_arg *arg)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) 	return rule->table;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) static inline u32 frh_get_table(struct fib_rule_hdr *frh, struct nlattr **nla)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) 	if (nla[FRA_TABLE])
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) 		return nla_get_u32(nla[FRA_TABLE]);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) 	return frh->table;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) static inline bool fib_rule_port_range_set(const struct fib_rule_port_range *range)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) 	return range->start != 0 && range->end != 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) static inline bool fib_rule_port_inrange(const struct fib_rule_port_range *a,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) 					 __be16 port)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) 	return ntohs(port) >= a->start &&
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) 		ntohs(port) <= a->end;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) static inline bool fib_rule_port_range_valid(const struct fib_rule_port_range *a)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) 	return a->start != 0 && a->end != 0 && a->end < 0xffff &&
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) 		a->start <= a->end;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) static inline bool fib_rule_port_range_compare(struct fib_rule_port_range *a,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) 					       struct fib_rule_port_range *b)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186) 	return a->start == b->start &&
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) 		a->end == b->end;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) static inline bool fib_rule_requires_fldissect(struct fib_rule *rule)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192) 	return rule->iifindex != LOOPBACK_IFINDEX && (rule->ip_proto ||
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) 		fib_rule_port_range_set(&rule->sport_range) ||
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) 		fib_rule_port_range_set(&rule->dport_range));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) struct fib_rules_ops *fib_rules_register(const struct fib_rules_ops *,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198) 					 struct net *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) void fib_rules_unregister(struct fib_rules_ops *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201) int fib_rules_lookup(struct fib_rules_ops *, struct flowi *, int flags,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202) 		     struct fib_lookup_arg *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) int fib_default_rule_add(struct fib_rules_ops *, u32 pref, u32 table,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204) 			 u32 flags);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205) bool fib_rule_matchall(const struct fib_rule *rule);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206) int fib_rules_dump(struct net *net, struct notifier_block *nb, int family,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) 		   struct netlink_ext_ack *extack);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208) unsigned int fib_rules_seq_read(struct net *net, int family);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210) int fib_nl_newrule(struct sk_buff *skb, struct nlmsghdr *nlh,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211) 		   struct netlink_ext_ack *extack);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212) int fib_nl_delrule(struct sk_buff *skb, struct nlmsghdr *nlh,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) 		   struct netlink_ext_ack *extack);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215) INDIRECT_CALLABLE_DECLARE(int fib6_rule_match(struct fib_rule *rule,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216) 					    struct flowi *fl, int flags));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217) INDIRECT_CALLABLE_DECLARE(int fib4_rule_match(struct fib_rule *rule,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218) 					    struct flowi *fl, int flags));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220) INDIRECT_CALLABLE_DECLARE(int fib6_rule_action(struct fib_rule *rule,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221) 			    struct flowi *flp, int flags,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222) 			    struct fib_lookup_arg *arg));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223) INDIRECT_CALLABLE_DECLARE(int fib4_rule_action(struct fib_rule *rule,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224) 			    struct flowi *flp, int flags,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 225) 			    struct fib_lookup_arg *arg));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 226) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 227) INDIRECT_CALLABLE_DECLARE(bool fib6_rule_suppress(struct fib_rule *rule,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 228) 						int flags,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 229) 						struct fib_lookup_arg *arg));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 230) INDIRECT_CALLABLE_DECLARE(bool fib4_rule_suppress(struct fib_rule *rule,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 231) 						int flags,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 232) 						struct fib_lookup_arg *arg));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 233) #endif