diff options
author | Daniel Lezcano <dlezcano@fr.ibm.com> | 2007-12-08 03:14:54 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 17:56:59 -0500 |
commit | 7e5449c21562f1554d2c355db1ec9d3e4f434288 (patch) | |
tree | 96e0eede0ade3339b6d4e202f77e4eecf658da4b /net | |
parent | c35b7e72cd48bc7163b6900fb3689fa54b572bba (diff) |
[IPV6]: route6 remove ifdef for fib_rules
The patch defines the usual static inline functions when the code is
disabled for fib6_rules. That's allow to remove some ifdef in route.c
file 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')
-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 c4e890abb2d4..11ef456d67c5 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c | |||
@@ -2526,11 +2526,10 @@ int __init ip6_route_init(void) | |||
2526 | if (ret) | 2526 | if (ret) |
2527 | goto out_proc_init; | 2527 | goto out_proc_init; |
2528 | 2528 | ||
2529 | #ifdef CONFIG_IPV6_MULTIPLE_TABLES | ||
2530 | ret = fib6_rules_init(); | 2529 | ret = fib6_rules_init(); |
2531 | if (ret) | 2530 | if (ret) |
2532 | goto xfrm6_init; | 2531 | goto xfrm6_init; |
2533 | #endif | 2532 | |
2534 | ret = -ENOBUFS; | 2533 | ret = -ENOBUFS; |
2535 | if (__rtnl_register(PF_INET6, RTM_NEWROUTE, inet6_rtm_newroute, NULL) || | 2534 | if (__rtnl_register(PF_INET6, RTM_NEWROUTE, inet6_rtm_newroute, NULL) || |
2536 | __rtnl_register(PF_INET6, RTM_DELROUTE, inet6_rtm_delroute, NULL) || | 2535 | __rtnl_register(PF_INET6, RTM_DELROUTE, inet6_rtm_delroute, NULL) || |
@@ -2542,10 +2541,8 @@ out: | |||
2542 | return ret; | 2541 | return ret; |
2543 | 2542 | ||
2544 | fib6_rules_init: | 2543 | fib6_rules_init: |
2545 | #ifdef CONFIG_IPV6_MULTIPLE_TABLES | ||
2546 | fib6_rules_cleanup(); | 2544 | fib6_rules_cleanup(); |
2547 | xfrm6_init: | 2545 | xfrm6_init: |
2548 | #endif | ||
2549 | xfrm6_fini(); | 2546 | xfrm6_fini(); |
2550 | out_proc_init: | 2547 | out_proc_init: |
2551 | ipv6_route_proc_fini(&init_net); | 2548 | ipv6_route_proc_fini(&init_net); |
@@ -2559,9 +2556,7 @@ out_kmem_cache: | |||
2559 | 2556 | ||
2560 | void ip6_route_cleanup(void) | 2557 | void ip6_route_cleanup(void) |
2561 | { | 2558 | { |
2562 | #ifdef CONFIG_IPV6_MULTIPLE_TABLES | ||
2563 | fib6_rules_cleanup(); | 2559 | fib6_rules_cleanup(); |
2564 | #endif | ||
2565 | ipv6_route_proc_fini(&init_net); | 2560 | ipv6_route_proc_fini(&init_net); |
2566 | xfrm6_fini(); | 2561 | xfrm6_fini(); |
2567 | rt6_ifdown(NULL); | 2562 | rt6_ifdown(NULL); |