Commit 5578689a authored by Daniel Lezcano's avatar Daniel Lezcano Committed by David S. Miller

[NETNS][IPV6] route6 - make route6 per namespace

This patch makes the routing engine use the network namespaces to
access routing informations: Add a network namespace parameter to
ipv6_route_ioctl and propagate the network namespace value to all the
routing code that have not yet been changed.
Signed-off-by: default avatarDaniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: default avatarBenjamin Thery <benjamin.thery@bull.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 7b4da532
...@@ -49,7 +49,9 @@ extern struct dst_entry * ip6_route_output(struct sock *sk, ...@@ -49,7 +49,9 @@ extern struct dst_entry * ip6_route_output(struct sock *sk,
extern int ip6_route_init(void); extern int ip6_route_init(void);
extern void ip6_route_cleanup(void); extern void ip6_route_cleanup(void);
extern int ipv6_route_ioctl(unsigned int cmd, void __user *arg); extern int ipv6_route_ioctl(struct net *net,
unsigned int cmd,
void __user *arg);
extern int ip6_route_add(struct fib6_config *cfg); extern int ip6_route_add(struct fib6_config *cfg);
extern int ip6_ins_rt(struct rt6_info *); extern int ip6_ins_rt(struct rt6_info *);
......
...@@ -440,6 +440,7 @@ EXPORT_SYMBOL(inet6_getname); ...@@ -440,6 +440,7 @@ EXPORT_SYMBOL(inet6_getname);
int inet6_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) int inet6_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
{ {
struct sock *sk = sock->sk; struct sock *sk = sock->sk;
struct net *net = sk->sk_net;
switch(cmd) switch(cmd)
{ {
...@@ -452,7 +453,7 @@ int inet6_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) ...@@ -452,7 +453,7 @@ int inet6_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
case SIOCADDRT: case SIOCADDRT:
case SIOCDELRT: case SIOCDELRT:
return(ipv6_route_ioctl(cmd,(void __user *)arg)); return(ipv6_route_ioctl(net, cmd, (void __user *)arg));
case SIOCSIFADDR: case SIOCSIFADDR:
return addrconf_add_ifaddr((void __user *) arg); return addrconf_add_ifaddr((void __user *) arg);
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment