Remove promisc counter from parent interface in carp_clone_destroy(),

so that parent interface is not left in promiscous mode after carp
interface is destroyed.

This is not perfect, since promisc counter is added when carp
interface is assigned an IP address. However, when address is removed
parent interface is still in promiscuous mode. Only removal of
carp interface removes promisc from parent. Same way in OpenBSD.

Sponsored by:	Rambler
This commit is contained in:
Gleb Smirnoff 2005-02-22 16:24:55 +00:00
parent aa2f6ddc3f
commit 67df421496
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=142243

View file

@ -400,6 +400,7 @@ carp_clone_destroy(struct ifnet *ifp)
sc->sc_ifp->if_carp = NULL;
CARP_LOCK_DESTROY(cif);
FREE(cif, M_CARP);
ifpromisc(sc->sc_ifp, 0);
} else {
CARP_UNLOCK(cif);
}