aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/ip_fib.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/ip_fib.h')
-rw-r--r--include/net/ip_fib.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/net/ip_fib.h b/include/net/ip_fib.h
index 523a170b0ecb..0e140830b85a 100644
--- a/include/net/ip_fib.h
+++ b/include/net/ip_fib.h
@@ -60,6 +60,7 @@ struct fib_nh {
60#endif 60#endif
61 int nh_oif; 61 int nh_oif;
62 __be32 nh_gw; 62 __be32 nh_gw;
63 __be32 nh_saddr;
63}; 64};
64 65
65/* 66/*
@@ -139,11 +140,13 @@ struct fib_result_nl {
139 140
140#endif /* CONFIG_IP_ROUTE_MULTIPATH */ 141#endif /* CONFIG_IP_ROUTE_MULTIPATH */
141 142
142#define FIB_RES_PREFSRC(res) ((res).fi->fib_prefsrc ? : __fib_res_prefsrc(&res)) 143#define FIB_RES_SADDR(res) (FIB_RES_NH(res).nh_saddr)
143#define FIB_RES_GW(res) (FIB_RES_NH(res).nh_gw) 144#define FIB_RES_GW(res) (FIB_RES_NH(res).nh_gw)
144#define FIB_RES_DEV(res) (FIB_RES_NH(res).nh_dev) 145#define FIB_RES_DEV(res) (FIB_RES_NH(res).nh_dev)
145#define FIB_RES_OIF(res) (FIB_RES_NH(res).nh_oif) 146#define FIB_RES_OIF(res) (FIB_RES_NH(res).nh_oif)
146 147
148#define FIB_RES_PREFSRC(res) ((res).fi->fib_prefsrc ? : FIB_RES_SADDR(res))
149
147struct fib_table { 150struct fib_table {
148 struct hlist_node tb_hlist; 151 struct hlist_node tb_hlist;
149 u32 tb_id; 152 u32 tb_id;
@@ -224,8 +227,8 @@ extern void fib_select_default(struct fib_result *res);
224extern int ip_fib_check_default(__be32 gw, struct net_device *dev); 227extern int ip_fib_check_default(__be32 gw, struct net_device *dev);
225extern int fib_sync_down_dev(struct net_device *dev, int force); 228extern int fib_sync_down_dev(struct net_device *dev, int force);
226extern int fib_sync_down_addr(struct net *net, __be32 local); 229extern int fib_sync_down_addr(struct net *net, __be32 local);
230extern void fib_update_nh_saddrs(struct net_device *dev);
227extern int fib_sync_up(struct net_device *dev); 231extern int fib_sync_up(struct net_device *dev);
228extern __be32 __fib_res_prefsrc(struct fib_result *res);
229extern void fib_select_multipath(const struct flowi *flp, struct fib_result *res); 232extern void fib_select_multipath(const struct flowi *flp, struct fib_result *res);
230 233
231/* Exported by fib_trie.c */ 234/* Exported by fib_trie.c */