Changeset View
Changeset View
Standalone View
Standalone View
head/sys/netpfil/pf/if_pfsync.c
Show First 20 Lines • Show All 329 Lines • ▼ Show 20 Lines | pfsync_clone_create(struct if_clone *ifc, int unit, caddr_t param) | ||||
if (unit != 0) | if (unit != 0) | ||||
return (EINVAL); | return (EINVAL); | ||||
if (! pfsync_buckets) | if (! pfsync_buckets) | ||||
pfsync_buckets = mp_ncpus * 2; | pfsync_buckets = mp_ncpus * 2; | ||||
sc = malloc(sizeof(struct pfsync_softc), M_PFSYNC, M_WAITOK | M_ZERO); | sc = malloc(sizeof(struct pfsync_softc), M_PFSYNC, M_WAITOK | M_ZERO); | ||||
sc->sc_flags |= PFSYNCF_OK; | |||||
sc->sc_maxupdates = 128; | sc->sc_maxupdates = 128; | ||||
ifp = sc->sc_ifp = if_alloc(IFT_PFSYNC); | ifp = sc->sc_ifp = if_alloc(IFT_PFSYNC); | ||||
if (ifp == NULL) { | if (ifp == NULL) { | ||||
free(sc, M_PFSYNC); | free(sc, M_PFSYNC); | ||||
return (ENOSPC); | return (ENOSPC); | ||||
} | } | ||||
if_initname(ifp, pfsyncname, unit); | if_initname(ifp, pfsyncname, unit); | ||||
▲ Show 20 Lines • Show All 2,206 Lines • Show Last 20 Lines |