]> rtime.felk.cvut.cz Git - socketcan-devel.git/blobdiff - kernel/2.6/net/can/raw.c
Updated check for correct net device namespaces introduced in Kernel 2.6.26
[socketcan-devel.git] / kernel / 2.6 / net / can / raw.c
index 68af1c33a927963405843b9fc05f7c909af34839..a5e9ee03033376e12f1ab27469a6541e28a58768 100644 (file)
@@ -231,7 +231,10 @@ static int raw_notifier(struct notifier_block *nb,
        struct sock *sk = ro->sk;
 #endif
 
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
+       if (dev_net(dev) != &init_net)
+               return NOTIFY_DONE;
+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)
        if (dev->nd_net != &init_net)
                return NOTIFY_DONE;
 #endif