summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2011-01-11 08:33:28 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2011-01-11 08:33:28 +0000
commitc7895d1ab28812357a1b2e67466f8d3f4d6b7bf6 (patch)
tree03afa7e11d7e3cfe9f13d26579039589c5fd7ffa
parentb213df0aa82ae99344ceb0938840e004a1cd96d1 (diff)
delay deferred packets for a maximum of 20ms instead of 100 ticks (which
varies by arch). the 20ms is still up for discussion. ok deraadt@
-rw-r--r--sys/net/if_pfsync.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/net/if_pfsync.c b/sys/net/if_pfsync.c
index 9bb4997b9b9..3f2b74f3df2 100644
--- a/sys/net/if_pfsync.c
+++ b/sys/net/if_pfsync.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_pfsync.c,v 1.159 2010/11/29 06:48:09 dlg Exp $ */
+/* $OpenBSD: if_pfsync.c,v 1.160 2011/01/11 08:33:27 dlg Exp $ */
/*
* Copyright (c) 2002 Michael Shalayeff
@@ -1695,8 +1695,6 @@ pfsync_insert_state(struct pf_state *st)
st->sync_updates = 0;
}
-int defer = 10;
-
int
pfsync_defer(struct pf_state *st, struct mbuf *m)
{
@@ -1725,7 +1723,7 @@ pfsync_defer(struct pf_state *st, struct mbuf *m)
TAILQ_INSERT_TAIL(&sc->sc_deferrals, pd, pd_entry);
timeout_set(&pd->pd_tmo, pfsync_defer_tmo, pd);
- timeout_add(&pd->pd_tmo, defer);
+ timeout_add_msec(&pd->pd_tmo, 20);
schednetisr(NETISR_PFSYNC);