diff options
author | Denis V. Lunev <den@openvz.org> | 2008-01-10 06:29:53 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:01:34 -0500 |
commit | 1bad118a330d494b23663fce94d4e9d9d5065fa7 (patch) | |
tree | 148ffe9ee7d6ab6319164c9889bcc1d76ec78db6 /net/ipv4/fib_frontend.c | |
parent | 4b5d47d4d372287b48a5fac8c497cba5e0618a36 (diff) |
[NETNS]: Pass namespace through ip_rt_ioctl.
... up to rtentry_to_fib_config
Acked-by: Benjamin Thery <benjamin.thery@bull.net>
Acked-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/fib_frontend.c')
-rw-r--r-- | net/ipv4/fib_frontend.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c index 8b44e3195242..15909a9fa9b2 100644 --- a/net/ipv4/fib_frontend.c +++ b/net/ipv4/fib_frontend.c | |||
@@ -437,7 +437,7 @@ static int rtentry_to_fib_config(struct net *net, int cmd, struct rtentry *rt, | |||
437 | * Handle IP routing ioctl calls. These are used to manipulate the routing tables | 437 | * Handle IP routing ioctl calls. These are used to manipulate the routing tables |
438 | */ | 438 | */ |
439 | 439 | ||
440 | int ip_rt_ioctl(unsigned int cmd, void __user *arg) | 440 | int ip_rt_ioctl(struct net *net, unsigned int cmd, void __user *arg) |
441 | { | 441 | { |
442 | struct fib_config cfg; | 442 | struct fib_config cfg; |
443 | struct rtentry rt; | 443 | struct rtentry rt; |
@@ -453,18 +453,18 @@ int ip_rt_ioctl(unsigned int cmd, void __user *arg) | |||
453 | return -EFAULT; | 453 | return -EFAULT; |
454 | 454 | ||
455 | rtnl_lock(); | 455 | rtnl_lock(); |
456 | err = rtentry_to_fib_config(&init_net, cmd, &rt, &cfg); | 456 | err = rtentry_to_fib_config(net, cmd, &rt, &cfg); |
457 | if (err == 0) { | 457 | if (err == 0) { |
458 | struct fib_table *tb; | 458 | struct fib_table *tb; |
459 | 459 | ||
460 | if (cmd == SIOCDELRT) { | 460 | if (cmd == SIOCDELRT) { |
461 | tb = fib_get_table(&init_net, cfg.fc_table); | 461 | tb = fib_get_table(net, cfg.fc_table); |
462 | if (tb) | 462 | if (tb) |
463 | err = tb->tb_delete(tb, &cfg); | 463 | err = tb->tb_delete(tb, &cfg); |
464 | else | 464 | else |
465 | err = -ESRCH; | 465 | err = -ESRCH; |
466 | } else { | 466 | } else { |
467 | tb = fib_new_table(&init_net, cfg.fc_table); | 467 | tb = fib_new_table(net, cfg.fc_table); |
468 | if (tb) | 468 | if (tb) |
469 | err = tb->tb_insert(tb, &cfg); | 469 | err = tb->tb_insert(tb, &cfg); |
470 | else | 470 | else |