Index: ip_carp.c =================================================================== RCS file: /cvs/src/sys/netinet/ip_carp.c,v retrieving revision 1.268 diff -u -p -r1.268 ip_carp.c --- ip_carp.c 11 Sep 2015 08:17:06 -0000 1.268 +++ ip_carp.c 12 Sep 2015 08:47:56 -0000 @@ -169,7 +169,6 @@ int carp_send_all_recur = 0; struct carp_if { TAILQ_HEAD(, carp_softc) vhif_vrs; - int vhif_nvrs; struct ifnet *vhif_ifp; }; @@ -891,7 +890,7 @@ carpdetach(struct carp_softc *sc) sc->lh_cookie); cif = (struct carp_if *)ifp->if_carp; TAILQ_REMOVE(&cif->vhif_vrs, sc, sc_list); - if (!--cif->vhif_nvrs) { + if (TAILQ_EMPTY(&cif->vhif_vrs)) { ifpromisc(ifp, 0); ifp->if_carp = NULL; free(cif, M_IFADDR, sizeof(*cif)); @@ -1731,7 +1730,6 @@ carp_set_ifp(struct carp_softc *sc, stru TAILQ_INSERT_AFTER(&cif->vhif_vrs, after, sc, sc_list); } - cif->vhif_nvrs++; } if (sc->sc_naddrs || sc->sc_naddrs6) sc->sc_if.if_flags |= IFF_UP;