Date: Mon, 4 Dec 2006 18:16:54 GMT From: Marko Zec <zec@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 111038 for review Message-ID: <200612041816.kB4IGsc7086134@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=111038 Change 111038 by zec@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. */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200612041816.kB4IGsc7086134>