Lines Matching defs:clone
6350 nat_t *clone;
6353 KMALLOC(clone, nat_t *);
6354 if (clone == NULL) {
6358 bcopy((char *)nat, (char *)clone, sizeof(*clone));
6360 MUTEX_NUKE(&clone->nat_lock);
6362 clone->nat_rev = fin->fin_rev;
6363 clone->nat_aps = NULL;
6367 clone->nat_tqe.tqe_pnext = NULL;
6368 clone->nat_tqe.tqe_next = NULL;
6369 clone->nat_tqe.tqe_ifq = NULL;
6370 clone->nat_tqe.tqe_parent = clone;
6372 clone->nat_flags &= ~SI_CLONE;
6373 clone->nat_flags |= SI_CLONED;
6375 if (clone->nat_hm)
6376 clone->nat_hm->hm_ref++;
6378 if (ipf_nat_insert(softc, softn, clone) == -1) {
6379 KFREE(clone);
6384 np = clone->nat_ptr;
6387 ipf_nat_log(softc, softn, clone, NL_CLONE);
6390 fr = clone->nat_fr;
6399 * Because the clone is created outside the normal loop of things and
6403 if (clone->nat_pr[0] == IPPROTO_TCP) {
6404 (void) ipf_tcp_age(&clone->nat_tqe, fin, softn->ipf_nat_tcptq,
6405 clone->nat_flags, 2);
6407 clone->nat_sync = ipf_sync_new(softc, SMC_NAT, fin, clone);
6409 ipf_nat_log(softc, softn, clone, NL_CLONE);
6410 return clone;