]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - net/ipv4/udp.c
[NET] NETNS: Omit net_device->nd_net without CONFIG_NET_NS.
[net-next-2.6.git] / net / ipv4 / udp.c
index b37581dfd02980be81095dcb492958d3b4987b19..e2cd93481359249f9dfc71baa9c05349a3c9d752 100644 (file)
@@ -357,7 +357,7 @@ void __udp4_lib_err(struct sk_buff *skb, u32 info, struct hlist_head udptable[])
        int harderr;
        int err;
 
-       sk = __udp4_lib_lookup(skb->dev->nd_net, iph->daddr, uh->dest,
+       sk = __udp4_lib_lookup(dev_net(skb->dev), iph->daddr, uh->dest,
                        iph->saddr, uh->source, skb->dev->ifindex, udptable);
        if (sk == NULL) {
                ICMP_INC_STATS_BH(ICMP_MIB_INERRORS);
@@ -1181,7 +1181,7 @@ int __udp4_lib_rcv(struct sk_buff *skb, struct hlist_head udptable[],
        if (rt->rt_flags & (RTCF_BROADCAST|RTCF_MULTICAST))
                return __udp4_lib_mcast_deliver(skb, uh, saddr, daddr, udptable);
 
-       sk = __udp4_lib_lookup(skb->dev->nd_net, saddr, uh->source, daddr,
+       sk = __udp4_lib_lookup(dev_net(skb->dev), saddr, uh->source, daddr,
                        uh->dest, inet_iif(skb), udptable);
 
        if (sk != NULL) {