From 26b9e1f07fa5d3e734eeb3d427a8c8a5faf735e6 Mon Sep 17 00:00:00 2001 From: Kristof Provost Date: Wed, 9 Nov 2022 17:11:26 +0100 Subject: [PATCH] dummynet: fix codel Serialize rcvif when enqueing packets for codel. We already tried to restore the serialized rcvif in fq_codel_extract_head(), but that doesn't work when we fail to serialize it first, so we ended up dropping all packets passed through codel. Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D37318 --- sys/netpfil/ipfw/dn_sched_fq_codel.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/netpfil/ipfw/dn_sched_fq_codel.c b/sys/netpfil/ipfw/dn_sched_fq_codel.c index 97341f5a9a60c8..0ac7694b6beff5 100644 --- a/sys/netpfil/ipfw/dn_sched_fq_codel.c +++ b/sys/netpfil/ipfw/dn_sched_fq_codel.c @@ -194,6 +194,9 @@ codel_enqueue(struct fq_codel_flow *q, struct mbuf *m, struct fq_codel_si *si) *(aqm_time_t *)(mtag + 1) = AQM_UNOW; m_tag_prepend(m, mtag); + if (m->m_pkthdr.rcvif != NULL) + m_rcvif_serialize(m); + mq_append(&q->mq, m); fq_update_stats(q, si, len, 0); return 0;