[PATCH net v2] net/sched: dualpi2: clear stale classification on filter miss
From: Samuel Moelius
Date: Tue Jun 09 2026 - 19:29:21 EST
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 path without reusing old
per-packet classification data.
Clear the classification result when the filter lookup does not match.
Fixes: 8f9516daedd6 ("sched: Add enqueue/dequeue of dualpi2 qdisc")
Assisted-by: Codex:gpt-5.5-cyber-preview
Signed-off-by: Samuel Moelius <sam.moelius@xxxxxxxxxxxxxxx>
---
Changes in v2:
- Add fixes tag
net/sched/sch_dualpi2.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/sched/sch_dualpi2.c b/net/sched/sch_dualpi2.c
index a22489c14458..8d345a8ee4e9 100644
--- a/net/sched/sch_dualpi2.c
+++ b/net/sched/sch_dualpi2.c
@@ -378,6 +378,8 @@ static int dualpi2_skb_classify(struct dualpi2_sched_data *q,
#endif
cb->classified = TC_H_MIN(res.classid) < __DUALPI2_C_MAX ?
TC_H_MIN(res.classid) : DUALPI2_C_CLASSIC;
+ } else {
+ cb->classified = DUALPI2_C_CLASSIC;
}
return NET_XMIT_SUCCESS;
}
--
2.43.0