]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - include/net/ip_fib.h
tcp: Stalling connections: Fix timeout calculation routine
[karo-tx-linux.git] / include / net / ip_fib.h
index 9daa60b544ba8839f8ca690fe2173ac5506d0922..4d22fabc7719de9b6b620ebfeba29332a2b31e2e 100644 (file)
@@ -69,6 +69,7 @@ struct fib_nh {
 struct fib_info {
        struct hlist_node       fib_hash;
        struct hlist_node       fib_lhash;
+       struct net              *fib_net;
        int                     fib_treeref;
        atomic_t                fib_clntref;
        int                     fib_dead;
@@ -123,14 +124,12 @@ struct fib_result_nl {
 #ifdef CONFIG_IP_ROUTE_MULTIPATH
 
 #define FIB_RES_NH(res)                ((res).fi->fib_nh[(res).nh_sel])
-#define FIB_RES_RESET(res)     ((res).nh_sel = 0)
 
 #define FIB_TABLE_HASHSZ 2
 
 #else /* CONFIG_IP_ROUTE_MULTIPATH */
 
 #define FIB_RES_NH(res)                ((res).fi->fib_nh[0])
-#define FIB_RES_RESET(res)
 
 #define FIB_TABLE_HASHSZ 256
 
@@ -144,7 +143,6 @@ struct fib_result_nl {
 struct fib_table {
        struct hlist_node tb_hlist;
        u32             tb_id;
-       unsigned        tb_stamp;
        int             tb_default;
        int             (*tb_lookup)(struct fib_table *tb, const struct flowi *flp, struct fib_result *res);
        int             (*tb_insert)(struct fib_table *, struct fib_config *);
@@ -212,13 +210,15 @@ extern struct fib_table *fib_get_table(struct net *net, u32 id);
 extern const struct nla_policy rtm_ipv4_policy[];
 extern void            ip_fib_init(void);
 extern int fib_validate_source(__be32 src, __be32 dst, u8 tos, int oif,
-                              struct net_device *dev, __be32 *spec_dst, u32 *itag);
+                              struct net_device *dev, __be32 *spec_dst,
+                              u32 *itag, u32 mark);
 extern void fib_select_default(struct net *net, const struct flowi *flp,
                               struct fib_result *res);
 
 /* Exported by fib_semantics.c */
 extern int ip_fib_check_default(__be32 gw, struct net_device *dev);
-extern int fib_sync_down(__be32 local, struct net_device *dev, int force);
+extern int fib_sync_down_dev(struct net_device *dev, int force);
+extern int fib_sync_down_addr(struct net *net, __be32 local);
 extern int fib_sync_up(struct net_device *dev);
 extern __be32  __fib_res_prefsrc(struct fib_result *res);
 extern void fib_select_multipath(const struct flowi *flp, struct fib_result *res);
@@ -264,6 +264,14 @@ static inline void fib_res_put(struct fib_result *res)
 #ifdef CONFIG_PROC_FS
 extern int __net_init  fib_proc_init(struct net *net);
 extern void __net_exit fib_proc_exit(struct net *net);
+#else
+static inline int fib_proc_init(struct net *net)
+{
+       return 0;
+}
+static inline void fib_proc_exit(struct net *net)
+{
+}
 #endif
 
 #endif  /* _NET_FIB_H */