]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/ipv6/ndisc.c
[IPV6] net/ipv6/ndisc.c: remove unused variable
[linux-2.6-omap-h63xx.git] / net / ipv6 / ndisc.c
index e217d3ff00f3d9ed03bc748bcc9f82e56d4e4abb..51557c27a0cdfc8e5d65337bf12ae0a4cf041da7 100644 (file)
@@ -556,7 +556,7 @@ static void ndisc_send_na(struct net_device *dev, struct neighbour *neigh,
        };
 
        /* for anycast or proxy, solicited_addr != src_addr */
-       ifp = ipv6_get_ifaddr(solicited_addr, dev, 1);
+       ifp = ipv6_get_ifaddr(&init_net, solicited_addr, dev, 1);
        if (ifp) {
                src_addr = solicited_addr;
                if (ifp->flags & IFA_F_OPTIMISTIC)
@@ -616,7 +616,8 @@ void ndisc_send_rs(struct net_device *dev, struct in6_addr *saddr,
         * suppress the inclusion of the sllao.
         */
        if (send_sllao) {
-               struct inet6_ifaddr *ifp = ipv6_get_ifaddr(saddr, dev, 1);
+               struct inet6_ifaddr *ifp = ipv6_get_ifaddr(&init_net, saddr,
+                                                          dev, 1);
                if (ifp) {
                        if (ifp->flags & IFA_F_OPTIMISTIC)  {
                                send_sllao = 0;
@@ -741,7 +742,7 @@ static void ndisc_recv_ns(struct sk_buff *skb)
 
        inc = ipv6_addr_is_multicast(daddr);
 
-       if ((ifp = ipv6_get_ifaddr(&msg->target, dev, 1)) != NULL) {
+       if ((ifp = ipv6_get_ifaddr(&init_net, &msg->target, dev, 1)) != NULL) {
 
                if (ifp->flags & (IFA_F_TENTATIVE|IFA_F_OPTIMISTIC)) {
                        if (dad) {
@@ -899,7 +900,7 @@ static void ndisc_recv_na(struct sk_buff *skb)
                        return;
                }
        }
-       if ((ifp = ipv6_get_ifaddr(&msg->target, dev, 1))) {
+       if ((ifp = ipv6_get_ifaddr(&init_net, &msg->target, dev, 1))) {
                if (ifp->flags & IFA_F_TENTATIVE) {
                        addrconf_dad_failure(ifp);
                        return;
@@ -1296,11 +1297,11 @@ skip_defrtr:
        }
 
        if (ndopts.nd_useropts) {
-               struct nd_opt_hdr *opt;
-               for (opt = ndopts.nd_useropts;
-                    opt;
-                    opt = ndisc_next_useropt(opt, ndopts.nd_useropts_end)) {
-                               ndisc_ra_useropt(skb, opt);
+               struct nd_opt_hdr *p;
+               for (p = ndopts.nd_useropts;
+                    p;
+                    p = ndisc_next_useropt(p, ndopts.nd_useropts_end)) {
+                       ndisc_ra_useropt(skb, p);
                }
        }
 
@@ -1419,7 +1420,6 @@ void ndisc_send_redirect(struct sk_buff *skb, struct neighbour *neigh,
        u8 *opt;
        int rd_len;
        int err;
-       int hlen;
        u8 ha_buf[MAX_ADDR_LEN], *ha = NULL;
 
        dev = skb->dev;
@@ -1490,7 +1490,6 @@ void ndisc_send_redirect(struct sk_buff *skb, struct neighbour *neigh,
                return;
        }
 
-       hlen = 0;
 
        skb_reserve(buff, LL_RESERVED_SPACE(dev));
        ip6_nd_hdr(sk, buff, dev, &saddr_buf, &ipv6_hdr(skb)->saddr,