aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/ip6_fib.c
diff options
context:
space:
mode:
authorDaniel Lezcano <dlezcano@fr.ibm.com>2008-01-10 06:01:01 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 18:01:20 -0500
commit4990509f19e8f1e000a83a88fc46328f73b8a88a (patch)
tree83d493e6081e9d2298a55925ee0a7f4bfedd0a51 /net/ipv6/ip6_fib.c
parent7c76509d0da99f29289b9b7ab134791e45d49b15 (diff)
[NETNS][IPV6]: Make sysctls route per namespace.
All the sysctl concerning the routes are moved to the network namespace structure. A helper function is called to initialize the variables. Because the ipv6 protocol is not yet per namespace, the variables are accessed relatively from the network namespace. Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/ip6_fib.c')
-rw-r--r--net/ipv6/ip6_fib.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c
index 7165a5e90f45..0e83164aa3e6 100644
--- a/net/ipv6/ip6_fib.c
+++ b/net/ipv6/ip6_fib.c
@@ -681,13 +681,15 @@ static __inline__ void fib6_start_gc(struct rt6_info *rt)
681{ 681{
682 if (ip6_fib_timer.expires == 0 && 682 if (ip6_fib_timer.expires == 0 &&
683 (rt->rt6i_flags & (RTF_EXPIRES|RTF_CACHE))) 683 (rt->rt6i_flags & (RTF_EXPIRES|RTF_CACHE)))
684 mod_timer(&ip6_fib_timer, jiffies + ip6_rt_gc_interval); 684 mod_timer(&ip6_fib_timer, jiffies +
685 init_net.ipv6.sysctl.ip6_rt_gc_interval);
685} 686}
686 687
687void fib6_force_start_gc(void) 688void fib6_force_start_gc(void)
688{ 689{
689 if (ip6_fib_timer.expires == 0) 690 if (ip6_fib_timer.expires == 0)
690 mod_timer(&ip6_fib_timer, jiffies + ip6_rt_gc_interval); 691 mod_timer(&ip6_fib_timer, jiffies +
692 init_net.ipv6.sysctl.ip6_rt_gc_interval);
691} 693}
692 694
693/* 695/*
@@ -1447,7 +1449,8 @@ void fib6_run_gc(unsigned long dummy)
1447{ 1449{
1448 if (dummy != ~0UL) { 1450 if (dummy != ~0UL) {
1449 spin_lock_bh(&fib6_gc_lock); 1451 spin_lock_bh(&fib6_gc_lock);
1450 gc_args.timeout = dummy ? (int)dummy : ip6_rt_gc_interval; 1452 gc_args.timeout = dummy ? (int)dummy :
1453 init_net.ipv6.sysctl.ip6_rt_gc_interval;
1451 } else { 1454 } else {
1452 local_bh_disable(); 1455 local_bh_disable();
1453 if (!spin_trylock(&fib6_gc_lock)) { 1456 if (!spin_trylock(&fib6_gc_lock)) {
@@ -1455,7 +1458,7 @@ void fib6_run_gc(unsigned long dummy)
1455 local_bh_enable(); 1458 local_bh_enable();
1456 return; 1459 return;
1457 } 1460 }
1458 gc_args.timeout = ip6_rt_gc_interval; 1461 gc_args.timeout = init_net.ipv6.sysctl.ip6_rt_gc_interval;
1459 } 1462 }
1460 gc_args.more = 0; 1463 gc_args.more = 0;
1461 1464
@@ -1463,7 +1466,8 @@ void fib6_run_gc(unsigned long dummy)
1463 fib6_clean_all(fib6_age, 0, NULL); 1466 fib6_clean_all(fib6_age, 0, NULL);
1464 1467
1465 if (gc_args.more) 1468 if (gc_args.more)
1466 mod_timer(&ip6_fib_timer, jiffies + ip6_rt_gc_interval); 1469 mod_timer(&ip6_fib_timer, jiffies +
1470 init_net.ipv6.sysctl.ip6_rt_gc_interval);
1467 else { 1471 else {
1468 del_timer(&ip6_fib_timer); 1472 del_timer(&ip6_fib_timer);
1469 ip6_fib_timer.expires = 0; 1473 ip6_fib_timer.expires = 0;