Date: Mon, 10 Sep 2007 00:20:56 GMT From: Marko Zec <zec@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 126247 for review Message-ID: <200709100020.l8A0KuJc002076@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=126247 Change 126247 by zec@zec_tpx32 on 2007/09/10 00:20:43 Set curvnet to ifp->if_vnet for each ifnet in if_clone_destroyif() during the cleanup process. This is necessary since it is possible for cloning ifnets to be assigned to remote vnets. Affected files ... .. //depot/projects/vimage/src/sys/net/if_clone.c#6 edit Differences ... ==== //depot/projects/vimage/src/sys/net/if_clone.c#6 (text+ko) ==== @@ -208,15 +208,14 @@ { int err; - if (ifc->ifc_destroy == NULL) { - err = EOPNOTSUPP; - goto done; - } + if (ifc->ifc_destroy == NULL) + return(EOPNOTSUPP); IF_CLONE_LOCK(ifc); IFC_IFLIST_REMOVE(ifc, ifp); IF_CLONE_UNLOCK(ifc); + CURVNET_SET_QUIET(ifp->if_vnet); if_delgroup(ifp, ifc->ifc_name); err = (*ifc->ifc_destroy)(ifc, ifp); @@ -228,8 +227,7 @@ IFC_IFLIST_INSERT(ifc, ifp); IF_CLONE_UNLOCK(ifc); } - -done: + CURVNET_RESTORE(); return (err); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200709100020.l8A0KuJc002076>