diff options
author | Camiel Dobbelaar <camield@cvs.openbsd.org> | 2011-10-24 17:51:32 +0000 |
---|---|---|
committer | Camiel Dobbelaar <camield@cvs.openbsd.org> | 2011-10-24 17:51:32 +0000 |
commit | 56edaccf440c2d1a30d5b4b3247fe90247432435 (patch) | |
tree | 3ce23b4e899689a7e933a69d4f98f7a6cb747b37 | |
parent | c04fa5838cfef315fbef75dc7faf049a6b8e73aa (diff) |
Don't detach interface from group in if_clone_destroy(),
if_detach() handles this ok. carpdetach() can now lower the demote
count on the carp group correctly.
ok henning mpf
-rw-r--r-- | sys/net/if.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/sys/net/if.c b/sys/net/if.c index f8969a2cb02..cbeb5ce5076 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if.c,v 1.239 2011/07/09 00:47:18 henning Exp $ */ +/* $OpenBSD: if.c,v 1.240 2011/10/24 17:51:31 camield Exp $ */ /* $NetBSD: if.c,v 1.35 1996/05/07 05:26:04 thorpej Exp $ */ /* @@ -712,7 +712,7 @@ if_clone_destroy(const char *name) { struct if_clone *ifc; struct ifnet *ifp; - int s, ret; + int s; ifc = if_clone_lookup(name, NULL); if (ifc == NULL) @@ -731,12 +731,7 @@ if_clone_destroy(const char *name) splx(s); } - if_delgroup(ifp, ifc->ifc_name); - - if ((ret = (*ifc->ifc_destroy)(ifp)) != 0) - if_addgroup(ifp, ifc->ifc_name); - - return (ret); + return ((*ifc->ifc_destroy)(ifp)); } /* |