Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ipv4: fix definition of FIB_TABLE_HASHSZ

a long time ago by the commit

commit 93456b6d7753def8760b423ac6b986eb9d5a4a95
Author: Denis V. Lunev <den@openvz.org>
Date: Thu Jan 10 03:23:38 2008 -0800

[IPV4]: Unify access to the routing tables.

the defenition of FIB_HASH_TABLE size has obtained wrong dependency:
it should depend upon CONFIG_IP_MULTIPLE_TABLES (as was in the original
code) but it was depended from CONFIG_IP_ROUTE_MULTIPATH

This patch returns the situation to the original state.

The problem was spotted by Tingwei Liu.

Signed-off-by: Denis V. Lunev <den@openvz.org>
CC: Tingwei Liu <tingw.liu@gmail.com>
CC: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Denis V. Lunev and committed by
David S. Miller
5b9e12db 2317f449

+6 -8
+6 -8
include/net/ip_fib.h
··· 152 152 }; 153 153 154 154 #ifdef CONFIG_IP_ROUTE_MULTIPATH 155 - 156 155 #define FIB_RES_NH(res) ((res).fi->fib_nh[(res).nh_sel]) 157 - 158 - #define FIB_TABLE_HASHSZ 2 159 - 160 156 #else /* CONFIG_IP_ROUTE_MULTIPATH */ 161 - 162 157 #define FIB_RES_NH(res) ((res).fi->fib_nh[0]) 163 - 164 - #define FIB_TABLE_HASHSZ 256 165 - 166 158 #endif /* CONFIG_IP_ROUTE_MULTIPATH */ 159 + 160 + #ifdef CONFIG_IP_MULTIPLE_TABLES 161 + #define FIB_TABLE_HASHSZ 256 162 + #else 163 + #define FIB_TABLE_HASHSZ 2 164 + #endif 167 165 168 166 extern __be32 fib_info_update_nh_saddr(struct net *net, struct fib_nh *nh); 169 167