diff options
-rw-r--r-- | include/net/route.h | 2 | ||||
-rw-r--r-- | net/ipv4/af_inet.c | 2 | ||||
-rw-r--r-- | net/ipv4/fib_frontend.c | 8 | ||||
-rw-r--r-- | net/ipv4/ipconfig.c | 2 |
4 files changed, 7 insertions, 7 deletions
diff --git a/include/net/route.h b/include/net/route.h index b77700059252..5847e6fabe8e 100644 --- a/include/net/route.h +++ b/include/net/route.h | |||
@@ -120,7 +120,7 @@ extern void ip_rt_send_redirect(struct sk_buff *skb); | |||
120 | extern unsigned inet_addr_type(struct net *net, __be32 addr); | 120 | extern unsigned inet_addr_type(struct net *net, __be32 addr); |
121 | extern unsigned inet_dev_addr_type(struct net *net, const struct net_device *dev, __be32 addr); | 121 | extern unsigned inet_dev_addr_type(struct net *net, const struct net_device *dev, __be32 addr); |
122 | extern void ip_rt_multicast_event(struct in_device *); | 122 | extern void ip_rt_multicast_event(struct in_device *); |
123 | extern int ip_rt_ioctl(unsigned int cmd, void __user *arg); | 123 | extern int ip_rt_ioctl(struct net *, unsigned int cmd, void __user *arg); |
124 | extern void ip_rt_get_source(u8 *src, struct rtable *rt); | 124 | extern void ip_rt_get_source(u8 *src, struct rtable *rt); |
125 | extern int ip_rt_dump(struct sk_buff *skb, struct netlink_callback *cb); | 125 | extern int ip_rt_dump(struct sk_buff *skb, struct netlink_callback *cb); |
126 | 126 | ||
diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c index d76f8d8d5eba..bcf8c8a4a3ad 100644 --- a/net/ipv4/af_inet.c +++ b/net/ipv4/af_inet.c | |||
@@ -795,7 +795,7 @@ int inet_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) | |||
795 | case SIOCADDRT: | 795 | case SIOCADDRT: |
796 | case SIOCDELRT: | 796 | case SIOCDELRT: |
797 | case SIOCRTMSG: | 797 | case SIOCRTMSG: |
798 | err = ip_rt_ioctl(cmd, (void __user *)arg); | 798 | err = ip_rt_ioctl(sk->sk_net, cmd, (void __user *)arg); |
799 | break; | 799 | break; |
800 | case SIOCDARP: | 800 | case SIOCDARP: |
801 | case SIOCGARP: | 801 | case SIOCGARP: |
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 |
diff --git a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c index 4bc3a57c183d..a52b5853aaa8 100644 --- a/net/ipv4/ipconfig.c +++ b/net/ipv4/ipconfig.c | |||
@@ -302,7 +302,7 @@ static int __init ic_route_ioctl(unsigned int cmd, struct rtentry *arg) | |||
302 | 302 | ||
303 | mm_segment_t oldfs = get_fs(); | 303 | mm_segment_t oldfs = get_fs(); |
304 | set_fs(get_ds()); | 304 | set_fs(get_ds()); |
305 | res = ip_rt_ioctl(cmd, (void __user *) arg); | 305 | res = ip_rt_ioctl(&init_net, cmd, (void __user *) arg); |
306 | set_fs(oldfs); | 306 | set_fs(oldfs); |
307 | return res; | 307 | return res; |
308 | } | 308 | } |