summaryrefslogtreecommitdiffstats
path: root/sys/netinet/ip_carp.c
diff options
context:
space:
mode:
authorglebius <glebius@FreeBSD.org>2005-02-22 16:24:55 +0000
committerglebius <glebius@FreeBSD.org>2005-02-22 16:24:55 +0000
commitea8eba8b921393c6f63477b1095899e25ce5d492 (patch)
tree0561df76a02c2d434fd977a23a68579d584efea6 /sys/netinet/ip_carp.c
parentf1d058e0327e1be6ec9de3aae8a83b20ad9a7325 (diff)
downloadFreeBSD-src-ea8eba8b921393c6f63477b1095899e25ce5d492.zip
FreeBSD-src-ea8eba8b921393c6f63477b1095899e25ce5d492.tar.gz
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
Diffstat (limited to 'sys/netinet/ip_carp.c')
-rw-r--r--sys/netinet/ip_carp.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/netinet/ip_carp.c b/sys/netinet/ip_carp.c
index ec54ef7..5333199 100644
--- a/sys/netinet/ip_carp.c
+++ b/sys/netinet/ip_carp.c
@@ -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);
}
OpenPOWER on IntegriCloud