PERFORCE change 111038 for review
Marko Zec
zec at FreeBSD.org
Mon Dec 4 10:16:55 PST 2006
http://perforce.freebsd.org/chv.cgi?CH=111038
Change 111038 by zec at zec_tca51 on 2006/12/04 18:16:34
When in a non-default vnet context, do not create / destroy
devfs handles on ifattach / ifdetach events.
Affected files ...
.. //depot/projects/vimage/src/sys/net/if.c#4 edit
Differences ...
==== //depot/projects/vimage/src/sys/net/if.c#4 (text+ko) ====
@@ -321,9 +321,14 @@
vnet_net_iattach();
#endif
IFNET_LOCK_INIT();
-#ifndef VIMAGE /* big XXX !!! */
+#ifdef VIMAGE
+ if (curvnetb == &vnetb_0) {
+ INIT_VNET_NET(curvnetb);
+#endif
ifdev_byindex(0) = make_dev(&net_cdevsw, 0,
UID_ROOT, GID_WHEEL, 0600, "network");
+#ifdef VIMAGE
+ }
#endif
if_clone_init();
}
@@ -536,7 +541,6 @@
#endif
#ifdef VIMAGE
- /* XXX this devd mess need to be solved... */
if (curvnetb == &vnetb_0) {
#endif
ifdev_byindex(ifp->if_index) = make_dev(&net_cdevsw,
@@ -772,7 +776,13 @@
* Clean up all addresses.
*/
ifp->if_addr = NULL;
+#ifdef VIMAGE
+ if (curvnetb == &vnetb_0) {
+#endif
destroy_dev(ifdev_byindex(ifp->if_index));
+#ifdef VIMAGE
+ }
+#endif
ifdev_byindex(ifp->if_index) = NULL;
/* We can now free link ifaddr. */
More information about the p4-projects
mailing list