if (((p->pfrkt_flags & setflag) == setflag) && !(p->pfrkt_flags & clrflag))
p->pfrkt_nflags = (p->pfrkt_flags | setflag) & ~clrflag; if (p->pfrkt_nflags == p->pfrkt_flags)
pfr_set_tflags(struct pfr_table *tbl, int size, int setflag, int clrflag,	int *nchange, int *ndel, int flags){	struct pfr_ktableworkq	 workq;	struct pfr_ktable	*p, *q, key;	int			 i, s, xchange = 0, xdel = 0;	ACCEPT_FLAGS(PFR_FLAG_ATOMIC+PFR_FLAG_DUMMY);	if ((setflag & ~PFR_TFLAG_USRMASK) ||	    (clrflag & ~PFR_TFLAG_USRMASK) ||	    (setflag & clrflag))		return (EINVAL);	SLIST_INIT(&workq);	for (i = 0; i < size; i++) {		if (copyin(tbl+i, &key.pfrkt_t, sizeof(key.pfrkt_t)))			return (EFAULT);		if (pfr_validate_table(&key.pfrkt_t, 0))			return (EINVAL);		p = RB_FIND(pfr_ktablehead, &pfr_ktables, &key);		if (p != NULL && (p->pfrkt_flags & PFR_TFLAG_ACTIVE)) {			if (((p->pfrkt_flags & setflag) == setflag) &&			    !(p->pfrkt_flags & clrflag))				goto _skip;			SLIST_FOREACH(q, &workq, pfrkt_workq)				if (!strcmp(p->pfrkt_name, q->pfrkt_name))					goto _skip;			SLIST_INSERT_HEAD(&workq, p, pfrkt_workq);			if ((p->pfrkt_flags & PFR_TFLAG_PERSIST) &&			    (clrflag & PFR_TFLAG_PERSIST) &&			    !(p->pfrkt_flags & PFR_TFLAG_REFERENCED))				xdel++;			else				xchange++;		}_skip:	}	if (!(flags & PFR_FLAG_DUMMY)) {		if (flags & PFR_FLAG_ATOMIC)			s = splsoftnet();		pfr_setflags_ktables(&workq, setflag, clrflag);		if (flags & PFR_FLAG_ATOMIC)			splx(s);	}	if (nchange != NULL)		*nchange = xchange;	if (ndel != NULL)		*ndel = xdel;	return (0);}