Skip to content

Commit 619fe32

Browse files
jhsmtdavem330
authored andcommitted
net_sched fix: reclassification needs to consider ether protocol changes
actions could change the etherproto in particular with ethernet tunnelled data. Typically such actions, after peeling the outer header, will ask for the packet to be reclassified. We then need to restart the classification with the new proto header. Example setup used to catch this: sudo tc qdisc add dev $ETH ingress sudo $TC filter add dev $ETH parent ffff: pref 1 protocol 802.1Q \ u32 match u32 0 0 flowid 1:1 \ action vlan pop reclassify Fixes: 3b3ae88 ("net: sched: consolidate tc_classify{,_compat}") Signed-off-by: Jamal Hadi Salim <[email protected]> Acked-by: Daniel Borkmann <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 39712e5 commit 619fe32

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

net/sched/sch_api.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1852,6 +1852,7 @@ int tc_classify(struct sk_buff *skb, const struct tcf_proto *tp,
18521852
}
18531853

18541854
tp = old_tp;
1855+
protocol = tc_skb_protocol(skb);
18551856
goto reclassify;
18561857
#endif
18571858
}

0 commit comments

Comments
 (0)