Commit cd0c4e7
net_sched: refetch skb protocol for each filter
Martin reported a set of filters don't work after changing
from reclassify to continue. Looking into the code, it
looks like skb protocol is not always fetched for each
iteration of the filters. But, as demonstrated by Martin,
TC actions could modify skb->protocol, for example act_vlan,
this means we have to refetch skb protocol in each iteration,
rather than using the one we fetch in the beginning of the loop.
This bug is _not_ introduced by commit 3b3ae88
("net: sched: consolidate tc_classify{,_compat}"), technically,
if act_vlan is the only action that modifies skb protocol, then
it is commit c7e2b96 ("sched: introduce vlan action") which
introduced this bug.
Reported-by: Martin Olsson <martin.olsson+netdev@sentorsecurity.com>
Cc: Jamal Hadi Salim <jhs@mojatatu.com>
Cc: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>1 parent f2f98c1 commit cd0c4e7
1 file changed
+1
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1277 | 1277 | | |
1278 | 1278 | | |
1279 | 1279 | | |
1280 | | - | |
1281 | 1280 | | |
1282 | 1281 | | |
1283 | 1282 | | |
| |||
1287 | 1286 | | |
1288 | 1287 | | |
1289 | 1288 | | |
| 1289 | + | |
1290 | 1290 | | |
1291 | 1291 | | |
1292 | 1292 | | |
| |||
1319 | 1319 | | |
1320 | 1320 | | |
1321 | 1321 | | |
1322 | | - | |
1323 | 1322 | | |
1324 | 1323 | | |
1325 | 1324 | | |
| |||
0 commit comments