diff options
Diffstat (limited to 'net/ipv6/ndisc.c')
-rw-r--r-- | net/ipv6/ndisc.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c index 282fdb31f8ed..beb48e3f038a 100644 --- a/net/ipv6/ndisc.c +++ b/net/ipv6/ndisc.c | |||
@@ -784,15 +784,17 @@ static void ndisc_recv_ns(struct sk_buff *skb) | |||
784 | 784 | ||
785 | idev = ifp->idev; | 785 | idev = ifp->idev; |
786 | } else { | 786 | } else { |
787 | struct net *net = dev_net(dev); | ||
788 | |||
787 | idev = in6_dev_get(dev); | 789 | idev = in6_dev_get(dev); |
788 | if (!idev) { | 790 | if (!idev) { |
789 | /* XXX: count this drop? */ | 791 | /* XXX: count this drop? */ |
790 | return; | 792 | return; |
791 | } | 793 | } |
792 | 794 | ||
793 | if (ipv6_chk_acast_addr(dev_net(dev), dev, &msg->target) || | 795 | if (ipv6_chk_acast_addr(net, dev, &msg->target) || |
794 | (idev->cnf.forwarding && | 796 | (idev->cnf.forwarding && |
795 | (ipv6_devconf.proxy_ndp || idev->cnf.proxy_ndp) && | 797 | (net->ipv6.devconf_all->proxy_ndp || idev->cnf.proxy_ndp) && |
796 | (is_router = pndisc_is_router(&msg->target, dev)) >= 0)) { | 798 | (is_router = pndisc_is_router(&msg->target, dev)) >= 0)) { |
797 | if (!(NEIGH_CB(skb)->flags & LOCALLY_ENQUEUED) && | 799 | if (!(NEIGH_CB(skb)->flags & LOCALLY_ENQUEUED) && |
798 | skb->pkt_type != PACKET_HOST && | 800 | skb->pkt_type != PACKET_HOST && |
@@ -921,6 +923,7 @@ static void ndisc_recv_na(struct sk_buff *skb) | |||
921 | 923 | ||
922 | if (neigh) { | 924 | if (neigh) { |
923 | u8 old_flags = neigh->flags; | 925 | u8 old_flags = neigh->flags; |
926 | struct net *net = dev_net(dev); | ||
924 | 927 | ||
925 | if (neigh->nud_state & NUD_FAILED) | 928 | if (neigh->nud_state & NUD_FAILED) |
926 | goto out; | 929 | goto out; |
@@ -931,8 +934,8 @@ static void ndisc_recv_na(struct sk_buff *skb) | |||
931 | * has already sent a NA to us. | 934 | * has already sent a NA to us. |
932 | */ | 935 | */ |
933 | if (lladdr && !memcmp(lladdr, dev->dev_addr, dev->addr_len) && | 936 | if (lladdr && !memcmp(lladdr, dev->dev_addr, dev->addr_len) && |
934 | ipv6_devconf.forwarding && ipv6_devconf.proxy_ndp && | 937 | net->ipv6.devconf_all->forwarding && net->ipv6.devconf_all->proxy_ndp && |
935 | pneigh_lookup(&nd_tbl, dev_net(dev), &msg->target, dev, 0)) { | 938 | pneigh_lookup(&nd_tbl, net, &msg->target, dev, 0)) { |
936 | /* XXX: idev->cnf.prixy_ndp */ | 939 | /* XXX: idev->cnf.prixy_ndp */ |
937 | goto out; | 940 | goto out; |
938 | } | 941 | } |