git: 26b9e1f07fa5 - main - dummynet: fix codel

From: Kristof Provost <kp_at_FreeBSD.org>
Date: Fri, 11 Nov 2022 12:19:25 UTC
The branch main has been updated by kp:

URL: https://cgit.FreeBSD.org/src/commit/?id=26b9e1f07fa5d3e734eeb3d427a8c8a5faf735e6

commit 26b9e1f07fa5d3e734eeb3d427a8c8a5faf735e6
Author:     Kristof Provost <kp@FreeBSD.org>
AuthorDate: 2022-11-09 16:11:26 +0000
Commit:     Kristof Provost <kp@FreeBSD.org>
CommitDate: 2022-11-11 10:53:31 +0000

    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 97341f5a9a60..0ac7694b6bef 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;