git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
netfilter: ipt_CLUSTERIP: fix a refcount bug in clusterip_config_find_get()
[pandora-kernel.git]
/
include
/
net
/
ip_fib.h
diff --git
a/include/net/ip_fib.h
b/include/net/ip_fib.h
index
10422ef
..
6e4569f
100644
(file)
--- a/
include/net/ip_fib.h
+++ b/
include/net/ip_fib.h
@@
-129,18
+129,16
@@
struct fib_result_nl {
};
#ifdef CONFIG_IP_ROUTE_MULTIPATH
};
#ifdef CONFIG_IP_ROUTE_MULTIPATH
-
#define FIB_RES_NH(res) ((res).fi->fib_nh[(res).nh_sel])
#define FIB_RES_NH(res) ((res).fi->fib_nh[(res).nh_sel])
-
-#define FIB_TABLE_HASHSZ 2
-
#else /* CONFIG_IP_ROUTE_MULTIPATH */
#else /* CONFIG_IP_ROUTE_MULTIPATH */
-
#define FIB_RES_NH(res) ((res).fi->fib_nh[0])
#define FIB_RES_NH(res) ((res).fi->fib_nh[0])
+#endif /* CONFIG_IP_ROUTE_MULTIPATH */
+#ifdef CONFIG_IP_MULTIPLE_TABLES
#define FIB_TABLE_HASHSZ 256
#define FIB_TABLE_HASHSZ 256
-
-#endif /* CONFIG_IP_ROUTE_MULTIPATH */
+#else
+#define FIB_TABLE_HASHSZ 2
+#endif
extern __be32 fib_info_update_nh_saddr(struct net *net, struct fib_nh *nh);
extern __be32 fib_info_update_nh_saddr(struct net *net, struct fib_nh *nh);
@@
-177,8
+175,8
@@
extern void fib_free_table(struct fib_table *tb);
#ifndef CONFIG_IP_MULTIPLE_TABLES
#ifndef CONFIG_IP_MULTIPLE_TABLES
-#define TABLE_LOCAL_INDEX
0
-#define TABLE_MAIN_INDEX
1
+#define TABLE_LOCAL_INDEX
(RT_TABLE_LOCAL & (FIB_TABLE_HASHSZ - 1))
+#define TABLE_MAIN_INDEX
(RT_TABLE_MAIN & (FIB_TABLE_HASHSZ - 1))
static inline struct fib_table *fib_get_table(struct net *net, u32 id)
{
static inline struct fib_table *fib_get_table(struct net *net, u32 id)
{