+ struct net_device *dev = (struct net_device *)data;
+ struct raw_sock *ro = container_of(nb, struct raw_sock, notifier);
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,12)
+ struct sock *sk = &ro->sk;
+#else
+ struct sock *sk = ro->sk;
+#endif
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
+ if (!net_eq(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
+
+ if (dev->type != ARPHRD_CAN)
+ return NOTIFY_DONE;