diff options
| author | Samuel Moelius <sam.moelius@trailofbits.com> | 2026-06-28 13:48:47 +0000 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2026-07-01 09:00:25 +0100 |
| commit | bf83ee45874e9f071478bed39f9cf40cc741629f (patch) | |
| tree | dd435c45de3df1750bc611e9bee48e6ffea415a2 /net | |
| parent | adc49c7ba690c9b33b8392ec27397456b65d0893 (diff) | |
| download | linux-2.6-bf83ee45874e9f071478bed39f9cf40cc741629f.tar.gz linux-2.6-bf83ee45874e9f071478bed39f9cf40cc741629f.zip | |
net/sched: dualpi2: clear stale classification on filter miss
DualPI2 leaves previous classification state attached to an skb when
filter classification returns no match. The enqueue path can then act
on stale state from an earlier classification attempt.
A filter miss should fall back to the default class without reusing old
per-packet classification data.
Initialize the classification result to CLASSIC before running the
classifier. Explicit L4S, priority, and successful filter
classification can still override that default.
Fixes: 8f9516daedd6 ("sched: Add enqueue/dequeue of dualpi2 qdisc")
Assisted-by: Codex:gpt-5.5-cyber-preview
Signed-off-by: Samuel Moelius <sam.moelius@trailofbits.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
| -rw-r--r-- | net/sched/sch_dualpi2.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/sched/sch_dualpi2.c b/net/sched/sch_dualpi2.c index 5434df6ca8ef..27088760eff4 100644 --- a/net/sched/sch_dualpi2.c +++ b/net/sched/sch_dualpi2.c @@ -346,6 +346,8 @@ static int dualpi2_skb_classify(struct dualpi2_sched_data *q, struct tcf_proto *fl; int result; + cb->classified = DUALPI2_C_CLASSIC; + dualpi2_read_ect(skb); if (cb->ect & q->ecn_mask) { cb->classified = DUALPI2_C_L4S; @@ -359,10 +361,8 @@ static int dualpi2_skb_classify(struct dualpi2_sched_data *q, } fl = rcu_dereference_bh(q->tcf_filters); - if (!fl) { - cb->classified = DUALPI2_C_CLASSIC; + if (!fl) return NET_XMIT_SUCCESS; - } result = tcf_classify(skb, NULL, fl, &res, false); if (result >= 0) { |
