Lines Matching refs:pfs_1301

531 	if (sp->pfs_1301.creatorid == 0) {  in pfsync_state_import()
534 ntohl(sp->pfs_1301.creatorid)); in pfsync_state_import()
538 if ((kif = pfi_kkif_find(sp->pfs_1301.ifname)) == NULL) { in pfsync_state_import()
541 sp->pfs_1301.ifname); in pfsync_state_import()
551 if (sp->pfs_1301.rule != htonl(-1) && sp->pfs_1301.anchor == htonl(-1) && in pfsync_state_import()
552 (flags & (PFSYNC_SI_IOCTL | PFSYNC_SI_CKSUM)) && ntohl(sp->pfs_1301.rule) < in pfsync_state_import()
555 PF_RULESET_FILTER].active.ptr_array[ntohl(sp->pfs_1301.rule)]; in pfsync_state_import()
574 bcopy(&sp->pfs_1301.key, key, sizeof(struct pfsync_state_key) * 2); in pfsync_state_import()
578 kw = &sp->pfs_1301.key[PF_SK_WIRE]; in pfsync_state_import()
579 ks = &sp->pfs_1301.key[PF_SK_STACK]; in pfsync_state_import()
582 if (PF_ANEQ(&kw->addr[0], &ks->addr[0], sp->pfs_1301.af) || in pfsync_state_import()
583 PF_ANEQ(&kw->addr[1], &ks->addr[1], sp->pfs_1301.af) || in pfsync_state_import()
593 if (pfsync_alloc_scrub_memory(&sp->pfs_1301.src, &st->src) || in pfsync_state_import()
594 pfsync_alloc_scrub_memory(&sp->pfs_1301.dst, &st->dst)) in pfsync_state_import()
602 skw->proto = sp->pfs_1301.proto; in pfsync_state_import()
603 skw->af = sp->pfs_1301.af; in pfsync_state_import()
609 sks->proto = sp->pfs_1301.proto; in pfsync_state_import()
610 sks->af = sp->pfs_1301.af; in pfsync_state_import()
614 bcopy(&sp->pfs_1301.rt_addr, &st->rt_addr, sizeof(st->rt_addr)); in pfsync_state_import()
615 st->creation = (time_uptime - ntohl(sp->pfs_1301.creation)) * 1000; in pfsync_state_import()
617 if (sp->pfs_1301.expire) { in pfsync_state_import()
620 timeout = r->timeout[sp->pfs_1301.timeout]; in pfsync_state_import()
622 timeout = V_pf_default_rule.timeout[sp->pfs_1301.timeout]; in pfsync_state_import()
625 st->expire -= (timeout - ntohl(sp->pfs_1301.expire)) * 1000; in pfsync_state_import()
628 st->direction = sp->pfs_1301.direction; in pfsync_state_import()
629 st->act.log = sp->pfs_1301.log; in pfsync_state_import()
630 st->timeout = sp->pfs_1301.timeout; in pfsync_state_import()
634 st->state_flags = sp->pfs_1301.state_flags; in pfsync_state_import()
700 st->id = sp->pfs_1301.id; in pfsync_state_import()
701 st->creatorid = sp->pfs_1301.creatorid; in pfsync_state_import()
702 pf_state_peer_ntoh(&sp->pfs_1301.src, &st->src); in pfsync_state_import()
703 pf_state_peer_ntoh(&sp->pfs_1301.dst, &st->dst); in pfsync_state_import()
1035 if (sp->pfs_1301.timeout >= PFTM_MAX || in pfsync_in_ins()
1036 sp->pfs_1301.src.state > PF_TCPS_PROXY_DST || in pfsync_in_ins()
1037 sp->pfs_1301.dst.state > PF_TCPS_PROXY_DST || in pfsync_in_ins()
1038 sp->pfs_1301.direction > PF_OUT || in pfsync_in_ins()
1039 (sp->pfs_1301.af != AF_INET && in pfsync_in_ins()
1040 sp->pfs_1301.af != AF_INET6)) { in pfsync_in_ins()
1162 if (sp->pfs_1301.timeout >= PFTM_MAX || in pfsync_in_upd()
1163 sp->pfs_1301.src.state > PF_TCPS_PROXY_DST || in pfsync_in_upd()
1164 sp->pfs_1301.dst.state > PF_TCPS_PROXY_DST) { in pfsync_in_upd()
1173 st = pf_find_state_byid(sp->pfs_1301.id, sp->pfs_1301.creatorid); in pfsync_in_upd()
1186 sync = pfsync_upd_tcp(st, &sp->pfs_1301.src, &sp->pfs_1301.dst); in pfsync_in_upd()
1194 if (st->src.state > sp->pfs_1301.src.state) in pfsync_in_upd()
1197 pf_state_peer_ntoh(&sp->pfs_1301.src, &st->src); in pfsync_in_upd()
1198 if (st->dst.state > sp->pfs_1301.dst.state) in pfsync_in_upd()
1201 pf_state_peer_ntoh(&sp->pfs_1301.dst, &st->dst); in pfsync_in_upd()
1204 pfsync_alloc_scrub_memory(&sp->pfs_1301.dst, &st->dst); in pfsync_in_upd()
1205 pf_state_peer_ntoh(&sp->pfs_1301.dst, &st->dst); in pfsync_in_upd()
1207 st->timeout = sp->pfs_1301.timeout; in pfsync_in_upd()