--- /usr/src/sys/modules/if_carp/Makefile.orig 2014-08-22 16:13:42.000000000 +0600 +++ /usr/src/sys/modules/if_carp/Makefile 2014-08-22 16:29:34.000000000 +0600 @@ -1,11 +1,12 @@ # $FreeBSD: releng/9.3/sys/modules/if_carp/Makefile 221267 2011-04-30 17:59:54Z bz $ .PATH: ${.CURDIR}/../../netinet +.PATH: ${.CURDIR}/../../crypto .include KMOD= if_carp -SRCS= ip_carp.c +SRCS= ip_carp.c sha1.c SRCS+= opt_carp.h opt_bpf.h opt_inet.h opt_inet6.h vnode_if.h .if !defined(KERNBUILDDIR) --- /usr/src/sys/netinet/ip_carp.c.orig 2014-08-27 10:17:05.000000000 +0600 +++ /usr/src/sys/netinet/ip_carp.c 2014-08-27 10:24:30.000000000 +0600 @@ -900,8 +900,11 @@ carp_send_ad_all(void) CARP_SCLOCK(sc); if ((SC2IFP(sc)->if_flags & IFF_UP) && (SC2IFP(sc)->if_drv_flags & IFF_DRV_RUNNING) && - sc->sc_state == MASTER) + sc->sc_state == MASTER) { + CURVNET_SET(sc->sc_carpdev->if_vnet); carp_send_ad_locked(sc); + CURVNET_RESTORE(); + } CARP_SCUNLOCK(sc); } mtx_unlock(&carp_mtx); @@ -913,7 +916,9 @@ carp_send_ad(void *v) struct carp_softc *sc = v; CARP_SCLOCK(sc); + CURVNET_SET(sc->sc_carpdev->if_vnet); carp_send_ad_locked(sc); + CURVNET_RESTORE(); CARP_SCUNLOCK(sc); } @@ -1364,7 +1369,9 @@ carp_master_down(void *v) struct carp_softc *sc = v; CARP_SCLOCK(sc); + CURVNET_SET(sc->sc_carpdev->if_vnet); carp_master_down_locked(sc); + CURVNET_RESTORE(); CARP_SCUNLOCK(sc); }