-/* $OpenBSD: if_pfsync.c,v 1.303 2022/04/14 11:39:44 bluhm Exp $ */
+/* $OpenBSD: if_pfsync.c,v 1.304 2022/04/20 20:51:09 bluhm Exp $ */
/*
* Copyright (c) 2002 Michael Shalayeff
while ((st = TAILQ_FIRST(&sn->sn_qs[q])) != NULL) {
TAILQ_REMOVE(&sn->sn_qs[q], st, sync_list);
-#ifdef PFSYNC_DEBUG
KASSERT(st->sync_state == q);
-#endif
st->sync_state = PFSYNC_S_NONE;
pf_state_unref(st);
}
count = 0;
while ((st = TAILQ_FIRST(&sn.sn_qs[q])) != NULL) {
TAILQ_REMOVE(&sn.sn_qs[q], st, sync_list);
-#ifdef PFSYNC_DEBUG
KASSERT(st->sync_state == q);
-#endif
st->sync_state = PFSYNC_S_NONE;
pfsync_qs[q].write(st, m->m_data + offset);
offset += pfsync_qs[q].len;
ISSET(st->state_flags, PFSTATE_NOSYNC))
return;
-#ifdef PFSYNC_DEBUG
KASSERT(st->sync_state == PFSYNC_S_NONE);
-#endif
if (sc->sc_len == PFSYNC_MINPKT)
timeout_add_sec(&sc->sc_tmo, 1);
struct pfsync_softc *sc = pfsyncif;
size_t nlen, sclen;
-#if defined(PFSYNC_DEBUG)
+#ifdef DIAGNOSTIC
if (sc->sc_len < PFSYNC_MINPKT)
panic("pfsync pkt len is too low %zd", sc->sc_len);
#endif