Commit cb7b593c authored by Stephen Hemminger's avatar Stephen Hemminger Committed by David S. Miller

[IPV4] fib_trie: fix proc interface

Create one iterator for walking over FIB trie, and use it
for all the /proc functions. Add a /proc/net/route
output for backwards compatibility with old applications.

Make initialization of fib_trie same as fib_hash so no #ifdef
is needed in af_inet.c

Fixes: http://bugzilla.kernel.org/show_bug.cgi?id=5209Signed-off-by: default avatarStephen Hemminger <shemminger@osdl.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 8259f162
...@@ -1248,11 +1248,6 @@ module_init(inet_init); ...@@ -1248,11 +1248,6 @@ module_init(inet_init);
/* ------------------------------------------------------------------------ */ /* ------------------------------------------------------------------------ */
#ifdef CONFIG_PROC_FS #ifdef CONFIG_PROC_FS
#ifdef CONFIG_IP_FIB_TRIE
extern int fib_stat_proc_init(void);
extern void fib_stat_proc_exit(void);
#endif
static int __init ipv4_proc_init(void) static int __init ipv4_proc_init(void)
{ {
int rc = 0; int rc = 0;
...@@ -1265,19 +1260,11 @@ static int __init ipv4_proc_init(void) ...@@ -1265,19 +1260,11 @@ static int __init ipv4_proc_init(void)
goto out_udp; goto out_udp;
if (fib_proc_init()) if (fib_proc_init())
goto out_fib; goto out_fib;
#ifdef CONFIG_IP_FIB_TRIE
if (fib_stat_proc_init())
goto out_fib_stat;
#endif
if (ip_misc_proc_init()) if (ip_misc_proc_init())
goto out_misc; goto out_misc;
out: out:
return rc; return rc;
out_misc: out_misc:
#ifdef CONFIG_IP_FIB_TRIE
fib_stat_proc_exit();
out_fib_stat:
#endif
fib_proc_exit(); fib_proc_exit();
out_fib: out_fib:
udp4_proc_exit(); udp4_proc_exit();
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment