]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - net/ax25/af_ax25.c
[NET]: Make device event notification network namespace safe
[net-next-2.6.git] / net / ax25 / af_ax25.c
index def6c42ad165bfde1b82e652d173cb341031e96a..8d13a8bca0e01128cd5a220d9c8f457254858435 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;