summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/net/if.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/net/if.c b/sys/net/if.c
index 5e8207a29f4..c57620c5e46 100644
--- a/sys/net/if.c
+++ b/sys/net/if.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if.c,v 1.98 2004/12/08 06:57:55 mcbride Exp $ */
+/* $OpenBSD: if.c,v 1.99 2004/12/08 07:02:16 mcbride Exp $ */
/* $NetBSD: if.c,v 1.35 1996/05/07 05:26:04 thorpej Exp $ */
/*
@@ -681,6 +681,7 @@ if_clone_destroy(name)
{
struct if_clone *ifc;
struct ifnet *ifp;
+ int s;
ifc = if_clone_lookup(name, NULL);
if (ifc == NULL)
@@ -693,6 +694,12 @@ if_clone_destroy(name)
if (ifc->ifc_destroy == NULL)
return (EOPNOTSUPP);
+ if (ifp->if_flags & IFF_UP) {
+ s = splimp();
+ if_down(ifp);
+ splx(s);
+ }
+
return ((*ifc->ifc_destroy)(ifp));
}