summaryrefslogtreecommitdiffstats
path: root/sys/contrib
diff options
context:
space:
mode:
authormlaier <mlaier@FreeBSD.org>2005-06-26 21:00:52 +0000
committermlaier <mlaier@FreeBSD.org>2005-06-26 21:00:52 +0000
commit79ac1f3888f7beea06b185083943e2dc7c93f63a (patch)
treef35bbc724e0b28aecc9ce324f26606d252745617 /sys/contrib
parentd2fd6dd3fbd62922e9b219babacabca023d40e20 (diff)
downloadFreeBSD-src-79ac1f3888f7beea06b185083943e2dc7c93f63a.zip
FreeBSD-src-79ac1f3888f7beea06b185083943e2dc7c93f63a.tar.gz
Properly initialize ifq_maxlen for the defered send queue and make it
actually work. Also use the right semantics for IF_HANDOFF to get correct stats. Reported and tested by: Sascha Luck <sascha at c4inet dot net> Approved by: re (blanket)
Diffstat (limited to 'sys/contrib')
-rw-r--r--sys/contrib/pf/net/if_pfsync.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/contrib/pf/net/if_pfsync.c b/sys/contrib/pf/net/if_pfsync.c
index 2239513..76af305 100644
--- a/sys/contrib/pf/net/if_pfsync.c
+++ b/sys/contrib/pf/net/if_pfsync.c
@@ -224,6 +224,7 @@ pfsync_clone_create(struct if_clone *ifc, int unit)
callout_init(&sc->sc_bulk_tmo, NET_CALLOUT_MPSAFE);
callout_init(&sc->sc_bulkfail_tmo, NET_CALLOUT_MPSAFE);
callout_init(&sc->sc_send_tmo, NET_CALLOUT_MPSAFE);
+ sc->sc_ifq.ifq_maxlen = ifqmaxlen;
mtx_init(&sc->sc_ifq.ifq_mtx, ifp->if_xname, "pfsync send queue",
MTX_DEF);
if_attach(ifp);
@@ -1797,7 +1798,7 @@ pfsync_sendout(sc)
pfsyncstats.pfsyncs_opackets++;
#ifdef __FreeBSD__
- if (IF_HANDOFF(&sc->sc_ifq, m, NULL))
+ if (!IF_HANDOFF(&sc->sc_ifq, m, NULL))
pfsyncstats.pfsyncs_oerrors++;
callout_reset(&sc->sc_send_tmo, 1, pfsync_senddef, sc);
#else
OpenPOWER on IntegriCloud