Index: pf.c =================================================================== RCS file: /cvs/src/sys/net/pf.c,v retrieving revision 1.1095 diff -u -p -r1.1095 pf.c --- pf.c 7 Dec 2020 08:29:41 -0000 1.1095 +++ pf.c 10 Dec 2020 04:13:13 -0000 @@ -7183,8 +7183,10 @@ done: pf_state_key_link_inpcb(s->key[PF_SK_STACK], pd.m->m_pkthdr.pf.inp); - if (s && (pd.m->m_pkthdr.csum_flags & M_FLOWID) == 0) + if (s != NULL && !ISSET(pd.m->m_pkthdr.csum_flags, M_FLOWID)) { pd.m->m_pkthdr.ph_flowid = bemtoh64(&s->id); + SET(pd.m->m_pkthdr.csum_flags, M_FLOWID); + } /* * connections redirected to loopback should not match sockets Index: fq_codel.c =================================================================== RCS file: /cvs/src/sys/net/fq_codel.c,v retrieving revision 1.13 diff -u -p -r1.13 fq_codel.c --- fq_codel.c 18 Jun 2020 23:29:59 -0000 1.13 +++ fq_codel.c 10 Dec 2020 04:13:13 -0000 @@ -521,12 +521,10 @@ codel_purge(struct codel *cd, struct mbu static inline struct flow * classify_flow(struct fqcodel *fqc, struct mbuf *m) { - unsigned int index; + unsigned int index = 0; if (m->m_pkthdr.csum_flags & M_FLOWID) index = m->m_pkthdr.ph_flowid % fqc->nflows; - else - index = arc4random_uniform(fqc->nflows); DPRINTF("%s: %u\n", __func__, index);