Tormod Volden
2008-07-28 21:44:32 UTC
Hi,
The netdevice namespace code changed in 2.6.26 and a new CONFIG_NET_NS
was introduced. If I understand correctly, the nd_net bit we added for
2.6.24 must now only be used if CONFIG_NET_NS is set. I am not sure
this is the most clean and correct way to handle this, but the below
patch seems to work.
Tormod
http://archive.netbsd.se/?ml=linux-netdev&a=2007-10&t=5568294
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c346dca10840a874240c78efe3f39acf4312a1f2
http://cateee.net/lkddb/web-lkddb/NET_NS.html
--- trunk/src/p80211/p80211netdev.c 2008-04-03 22:42:58.000000000 +0200
+++ p80211netdev.c 2008-07-28 21:06:36.000000000 +0200
@@ -948,8 +948,10 @@ int wlan_setup(wlandevice_t *wlandev)
#endif
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24) )
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,26) || defined(CONFIG_NET_NS))
dev->nd_net = &init_net;
#endif
+#endif
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,3,38) )
dev->tbusy = 1;
The netdevice namespace code changed in 2.6.26 and a new CONFIG_NET_NS
was introduced. If I understand correctly, the nd_net bit we added for
2.6.24 must now only be used if CONFIG_NET_NS is set. I am not sure
this is the most clean and correct way to handle this, but the below
patch seems to work.
Tormod
http://archive.netbsd.se/?ml=linux-netdev&a=2007-10&t=5568294
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c346dca10840a874240c78efe3f39acf4312a1f2
http://cateee.net/lkddb/web-lkddb/NET_NS.html
--- trunk/src/p80211/p80211netdev.c 2008-04-03 22:42:58.000000000 +0200
+++ p80211netdev.c 2008-07-28 21:06:36.000000000 +0200
@@ -948,8 +948,10 @@ int wlan_setup(wlandevice_t *wlandev)
#endif
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24) )
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,26) || defined(CONFIG_NET_NS))
dev->nd_net = &init_net;
#endif
+#endif
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,3,38) )
dev->tbusy = 1;