PERFORCE change 126247 for review
Marko Zec
zec at FreeBSD.org
Sun Sep 9 17:20:57 PDT 2007
http://perforce.freebsd.org/chv.cgi?CH=126247
Change 126247 by zec at 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);
}
More information about the p4-projects
mailing list