summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2011-07-22 15:59:41 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2011-07-22 15:59:41 +0000
commit87705d09bb0342308c7eaf55976b90e3085b6b9b (patch)
tree966130b6e48857cf5e9c58c87a74e2db950ea2a9 /sys
parent915449cddfb6fddbd3bfba7834b7e176beab7b31 (diff)
use ifmedia_delete_instance() when destroying a vether
from Martin Pelikan
Diffstat (limited to 'sys')
-rw-r--r--sys/net/if_vether.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/net/if_vether.c b/sys/net/if_vether.c
index e63beb74dd5..0442b76b64e 100644
--- a/sys/net/if_vether.c
+++ b/sys/net/if_vether.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_vether.c,v 1.15 2010/04/02 21:45:49 deraadt Exp $ */
+/* $OpenBSD: if_vether.c,v 1.16 2011/07/22 15:59:40 deraadt Exp $ */
/*
* Copyright (c) 2009 Theo de Raadt
@@ -106,6 +106,7 @@ vether_clone_destroy(struct ifnet *ifp)
{
struct vether_softc *sc = ifp->if_softc;
+ ifmedia_delete_instance(&sc->sc_media, IFM_INST_ANY);
ether_ifdetach(ifp);
if_detach(ifp);
free(sc, M_DEVBUF);