pf_remove_state() should not attempt to remove state which
authorsashan <sashan@openbsd.org>
Mon, 5 Jun 2023 08:37:27 +0000 (08:37 +0000)
committersashan <sashan@openbsd.org>
Mon, 5 Jun 2023 08:37:27 +0000 (08:37 +0000)
is already removed.

OK dlg@

sys/net/pf.c

index 81939d4..b3a655b 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: pf.c,v 1.1180 2023/05/15 16:34:56 bluhm Exp $ */
+/*     $OpenBSD: pf.c,v 1.1181 2023/06/05 08:37:27 sashan Exp $ */
 
 /*
  * Copyright (c) 2001 Daniel Hartmeier
@@ -1714,6 +1714,9 @@ pf_remove_state(struct pf_state *st)
 {
        PF_ASSERT_LOCKED();
 
+       if (st->timeout == PFTM_UNLINKED)
+               return;
+
        /* handle load balancing related tasks */
        pf_postprocess_addr(st);