hc
2023-12-09 b22da3d8526a935aa31e086e63f60ff3246cb61c
kernel/net/ipv4/fib_lookup.h
....@@ -5,6 +5,7 @@
55 #include <linux/types.h>
66 #include <linux/list.h>
77 #include <net/ip_fib.h>
8
+#include <net/nexthop.h>
89
910 struct fib_alias {
1011 struct hlist_node fa_list;
....@@ -15,6 +16,9 @@
1516 u8 fa_slen;
1617 u32 tb_id;
1718 s16 fa_default;
19
+ u8 offload:1,
20
+ trap:1,
21
+ unused:6;
1822 struct rcu_head rcu;
1923 };
2024
....@@ -31,12 +35,11 @@
3135 void fib_release_info(struct fib_info *);
3236 struct fib_info *fib_create_info(struct fib_config *cfg,
3337 struct netlink_ext_ack *extack);
34
-int fib_nh_match(struct fib_config *cfg, struct fib_info *fi,
38
+int fib_nh_match(struct net *net, struct fib_config *cfg, struct fib_info *fi,
3539 struct netlink_ext_ack *extack);
3640 bool fib_metrics_match(struct fib_config *cfg, struct fib_info *fi);
37
-int fib_dump_info(struct sk_buff *skb, u32 pid, u32 seq, int event, u32 tb_id,
38
- u8 type, __be32 dst, int dst_len, u8 tos, struct fib_info *fi,
39
- unsigned int);
41
+int fib_dump_info(struct sk_buff *skb, u32 pid, u32 seq, int event,
42
+ struct fib_rt_info *fri, unsigned int flags);
4043 void rtmsg_fib(int event, __be32 key, struct fib_alias *fa, int dst_len,
4144 u32 tb_id, const struct nl_info *info, unsigned int nlm_flags);
4245
....@@ -45,6 +48,7 @@
4548 {
4649 /* we used to play games with refcounts, but we now use RCU */
4750 res->fi = fi;
51
+ res->nhc = fib_info_nhc(fi, 0);
4852 }
4953
5054 struct fib_prop {