struct dev_rcv_lists *d;
int matches;
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
+ if (dev->type != ARPHRD_CAN || dev_net(dev) != &init_net) {
+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)
if (dev->type != ARPHRD_CAN || dev->nd_net != &init_net) {
#else
if (dev->type != ARPHRD_CAN) {
struct net_device *dev = (struct net_device *)data;
struct dev_rcv_lists *d;
-#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
struct bcm_op *op;
int notify_enodev = 0;
-#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
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