| .. | .. |
|---|
| 5 | 5 | #include <linux/types.h> |
|---|
| 6 | 6 | #include <linux/list.h> |
|---|
| 7 | 7 | #include <net/ip_fib.h> |
|---|
| 8 | +#include <net/nexthop.h> |
|---|
| 8 | 9 | |
|---|
| 9 | 10 | struct fib_alias { |
|---|
| 10 | 11 | struct hlist_node fa_list; |
|---|
| .. | .. |
|---|
| 15 | 16 | u8 fa_slen; |
|---|
| 16 | 17 | u32 tb_id; |
|---|
| 17 | 18 | s16 fa_default; |
|---|
| 19 | + u8 offload:1, |
|---|
| 20 | + trap:1, |
|---|
| 21 | + unused:6; |
|---|
| 18 | 22 | struct rcu_head rcu; |
|---|
| 19 | 23 | }; |
|---|
| 20 | 24 | |
|---|
| .. | .. |
|---|
| 31 | 35 | void fib_release_info(struct fib_info *); |
|---|
| 32 | 36 | struct fib_info *fib_create_info(struct fib_config *cfg, |
|---|
| 33 | 37 | 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, |
|---|
| 35 | 39 | struct netlink_ext_ack *extack); |
|---|
| 36 | 40 | 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); |
|---|
| 40 | 43 | void rtmsg_fib(int event, __be32 key, struct fib_alias *fa, int dst_len, |
|---|
| 41 | 44 | u32 tb_id, const struct nl_info *info, unsigned int nlm_flags); |
|---|
| 42 | 45 | |
|---|
| .. | .. |
|---|
| 45 | 48 | { |
|---|
| 46 | 49 | /* we used to play games with refcounts, but we now use RCU */ |
|---|
| 47 | 50 | res->fi = fi; |
|---|
| 51 | + res->nhc = fib_info_nhc(fi, 0); |
|---|
| 48 | 52 | } |
|---|
| 49 | 53 | |
|---|
| 50 | 54 | struct fib_prop { |
|---|