diff options
author | Daniel Lezcano <dlezcano@fr.ibm.com> | 2007-12-08 00:14:11 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 14:56:59 -0800 |
commit | c35b7e72cd48bc7163b6900fb3689fa54b572bba (patch) | |
tree | 28e1386d9c0a7522e40d6d77b2c912f88f0e8a36 /net/ipv6/route.c | |
parent | 75314fb38364c81a573cd222f74d792409a7afba (diff) | |
download | lwn-c35b7e72cd48bc7163b6900fb3689fa54b572bba.tar.gz lwn-c35b7e72cd48bc7163b6900fb3689fa54b572bba.zip |
[IPV6]: remove ifdef in route6 for xfrm6
The following patch create the usual static inline functions to disable
the xfrm6_init and xfrm6_fini function when XFRM is off.
That's allow to remove some ifdef and make the code a little more clear.
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Acked-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/route.c')
-rw-r--r-- | net/ipv6/route.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index dbdae143ef5f..c4e890abb2d4 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -2522,11 +2522,10 @@ int __init ip6_route_init(void) if (ret) goto out_fib6_init; -#ifdef CONFIG_XFRM ret = xfrm6_init(); if (ret) goto out_proc_init; -#endif + #ifdef CONFIG_IPV6_MULTIPLE_TABLES ret = fib6_rules_init(); if (ret) @@ -2547,9 +2546,7 @@ fib6_rules_init: fib6_rules_cleanup(); xfrm6_init: #endif -#ifdef CONFIG_XFRM xfrm6_fini(); -#endif out_proc_init: ipv6_route_proc_fini(&init_net); out_fib6_init: @@ -2566,9 +2563,7 @@ void ip6_route_cleanup(void) fib6_rules_cleanup(); #endif ipv6_route_proc_fini(&init_net); -#ifdef CONFIG_XFRM xfrm6_fini(); -#endif rt6_ifdown(NULL); fib6_gc_cleanup(); kmem_cache_destroy(ip6_dst_ops.kmem_cachep); |