]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - net/core/pktgen.c
[NET] NETNS: Omit net_device->nd_net without CONFIG_NET_NS.
[net-next-2.6.git] / net / core / pktgen.c
index 20e63b302ba613ea7112365376d0773f4a7a8fbf..a803b442234c5ae1ddee3a89fe9cf04e126f97b3 100644 (file)
@@ -1874,7 +1874,7 @@ static int pktgen_device_event(struct notifier_block *unused,
 {
        struct net_device *dev = ptr;
 
-       if (dev->nd_net != &init_net)
+       if (dev_net(dev) != &init_net)
                return NOTIFY_DONE;
 
        /* It is OK that we do not hold the group lock right now,