]> err.no Git - linux-2.6/blobdiff - net/ax25/af_ax25.c
[MAC80211]: rework hardware crypto flags
[linux-2.6] / net / ax25 / af_ax25.c
index def6c42ad165bfde1b82e652d173cb341031e96a..993e5c75e90908c22c079f02ae5646f250fbfa8f 100644 (file)
@@ -104,6 +104,9 @@ static int ax25_device_event(struct notifier_block *this, unsigned long event,
 {
        struct net_device *dev = (struct net_device *)ptr;
 
+       if (dev->nd_net != &init_net)
+               return NOTIFY_DONE;
+
        /* Reject non AX.25 devices */
        if (dev->type != ARPHRD_AX25)
                return NOTIFY_DONE;
@@ -628,7 +631,7 @@ static int ax25_setsockopt(struct socket *sock, int level, int optname,
                        break;
                }
 
-               dev = dev_get_by_name(devname);
+               dev = dev_get_by_name(&init_net, devname);
                if (dev == NULL) {
                        res = -ENODEV;
                        break;