]> git.openpandora.org Git - pandora-kernel.git/commitdiff
[NETNS][IPV6] route6 - Pass the network namespace parameter to rt6_lookup
authorDaniel Lezcano <dlezcano@fr.ibm.com>
Tue, 4 Mar 2008 21:45:59 +0000 (13:45 -0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 4 Mar 2008 21:45:59 +0000 (13:45 -0800)
Add a network namespace parameter to rt6_lookup().

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: Benjamin Thery <benjamin.thery@bull.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/ip6_route.h
net/ipv6/addrconf.c
net/ipv6/anycast.c
net/ipv6/ip6_tunnel.c
net/ipv6/mcast.c
net/ipv6/route.c
net/ipv6/sit.c

index 79dce496f4d4c2cdf403049b080fc8facb52b280..92004c5160c700287258d7f9d2cdfe95e9d6cd11 100644 (file)
@@ -69,7 +69,8 @@ extern void                   rt6_sndmsg(int type, struct in6_addr *dst,
                                           int dstlen, int srclen,
                                           int metric, __u32 flags);
 
-extern struct rt6_info         *rt6_lookup(struct in6_addr *daddr,
+extern struct rt6_info         *rt6_lookup(struct net *net,
+                                           struct in6_addr *daddr,
                                            struct in6_addr *saddr,
                                            int oif, int flags);
 
index a1d872dacad64fbd98f772c0357d813e125c9418..9d894e8c7b724aff0be59207717c471e1e3b1e15 100644 (file)
@@ -753,7 +753,7 @@ static void ipv6_del_addr(struct inet6_ifaddr *ifp)
                struct rt6_info *rt;
 
                ipv6_addr_prefix(&prefix, &ifp->addr, ifp->prefix_len);
-               rt = rt6_lookup(&prefix, NULL, ifp->idev->dev->ifindex, 1);
+               rt = rt6_lookup(&init_net, &prefix, NULL, ifp->idev->dev->ifindex, 1);
 
                if (rt && ((rt->rt6i_flags & (RTF_GATEWAY | RTF_DEFAULT)) == 0)) {
                        if (onlink == 0) {
@@ -1700,7 +1700,7 @@ void addrconf_prefix_rcv(struct net_device *dev, u8 *opt, int len)
 
        if (pinfo->onlink) {
                struct rt6_info *rt;
-               rt = rt6_lookup(&pinfo->prefix, NULL, dev->ifindex, 1);
+               rt = rt6_lookup(&init_net, &pinfo->prefix, NULL, dev->ifindex, 1);
 
                if (rt && ((rt->rt6i_flags & (RTF_GATEWAY | RTF_DEFAULT)) == 0)) {
                        if (rt->rt6i_flags&RTF_EXPIRES) {
index 9c7f83fbc3a1d28b89bf7f26115c4d8d39f92085..96868b994b370a882561d71e9b69dd728838bc86 100644 (file)
@@ -101,7 +101,7 @@ int ipv6_sock_ac_join(struct sock *sk, int ifindex, struct in6_addr *addr)
        if (ifindex == 0) {
                struct rt6_info *rt;
 
-               rt = rt6_lookup(addr, NULL, 0, 0);
+               rt = rt6_lookup(&init_net, addr, NULL, 0, 0);
                if (rt) {
                        dev = rt->rt6i_dev;
                        dev_hold(dev);
index 78f438880923b74e24dfd545b9d586b7a54fecd6..4e1981660b3c228b816974eeffb85ce4e8a665c2 100644 (file)
@@ -602,7 +602,7 @@ ip6ip6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
                skb_reset_network_header(skb2);
 
                /* Try to guess incoming interface */
-               rt = rt6_lookup(&ipv6_hdr(skb2)->saddr, NULL, 0, 0);
+               rt = rt6_lookup(&init_net, &ipv6_hdr(skb2)->saddr, NULL, 0, 0);
 
                if (rt && rt->rt6i_dev)
                        skb2->dev = rt->rt6i_dev;
@@ -1112,7 +1112,7 @@ static void ip6_tnl_link_config(struct ip6_tnl *t)
                int strict = (ipv6_addr_type(&p->raddr) &
                              (IPV6_ADDR_MULTICAST|IPV6_ADDR_LINKLOCAL));
 
-               struct rt6_info *rt = rt6_lookup(&p->raddr, &p->laddr,
+               struct rt6_info *rt = rt6_lookup(&init_net, &p->raddr, &p->laddr,
                                                 p->link, strict);
 
                if (rt == NULL)
index a373b8e7f241fa2cf96b794f007b30ae27eb2d7a..197ca390a15d166fa24f092af51e107873deb601 100644 (file)
@@ -208,7 +208,7 @@ int ipv6_sock_mc_join(struct sock *sk, int ifindex, struct in6_addr *addr)
 
        if (ifindex == 0) {
                struct rt6_info *rt;
-               rt = rt6_lookup(addr, NULL, 0, 0);
+               rt = rt6_lookup(&init_net, addr, NULL, 0, 0);
                if (rt) {
                        dev = rt->rt6i_dev;
                        dev_hold(dev);
@@ -294,7 +294,7 @@ static struct inet6_dev *ip6_mc_find_dev(struct in6_addr *group, int ifindex)
        if (ifindex == 0) {
                struct rt6_info *rt;
 
-               rt = rt6_lookup(group, NULL, 0, 0);
+               rt = rt6_lookup(&init_net, group, NULL, 0, 0);
                if (rt) {
                        dev = rt->rt6i_dev;
                        dev_hold(dev);
Simple merge
diff --cc net/ipv6/sit.c
Simple merge