diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2022-04-20 20:51:10 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2022-04-20 20:51:10 +0000 |
commit | c8e3a29de6fdba904574f8475812896c257a3604 (patch) | |
tree | ffd96f64787d3869f1258371be04add700d8dc04 /sys/net | |
parent | 793c033a5aafd02055bb901b3ac27045257c1eea (diff) |
In pfsync there were some KASSERT hidden behind #ifdef PFSYNC_DEBUG.
Assertions should be active and rely on #ifdef DIAGNOSTIC. Retire
PFSYNC_DEBUG.
OK sashan@ dlg@
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/if_pfsync.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/sys/net/if_pfsync.c b/sys/net/if_pfsync.c index fc6843b541f..fb28da1295d 100644 --- a/sys/net/if_pfsync.c +++ b/sys/net/if_pfsync.c @@ -1,4 +1,4 @@ -/* $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 @@ -1620,9 +1620,7 @@ pfsync_drop_snapshot(struct pfsync_snapshot *sn, struct pfsync_softc * sc) 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); } @@ -1857,9 +1855,7 @@ pfsync_sendout(void) 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; @@ -1916,9 +1912,7 @@ pfsync_insert_state(struct pf_state *st) 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); @@ -2403,7 +2397,7 @@ pfsync_q_ins(struct pf_state *st, int q) 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 |