net sched actions: skbedit add support for mod-ing skb pkt_type
Extremely useful for setting packet type to host so i dont have to modify the dst mac address using pedit (which requires that i know the mac address) Example usage: tc filter add dev eth0 parent ffff: protocol ip pref 9 u32 \ match ip src 5.5.5.5/32 \ flowid 1:5 action skbedit ptype host This will tag all packets incoming from 5.5.5.5 with type PACKET_HOST Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com> Acked-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
8b10cab64c
commit
ff202ee1ed
@@ -27,6 +27,7 @@
|
||||
#define SKBEDIT_F_PRIORITY 0x1
|
||||
#define SKBEDIT_F_QUEUE_MAPPING 0x2
|
||||
#define SKBEDIT_F_MARK 0x4
|
||||
#define SKBEDIT_F_PTYPE 0x8
|
||||
|
||||
struct tc_skbedit {
|
||||
tc_gen;
|
||||
@@ -40,6 +41,7 @@ enum {
|
||||
TCA_SKBEDIT_QUEUE_MAPPING,
|
||||
TCA_SKBEDIT_MARK,
|
||||
TCA_SKBEDIT_PAD,
|
||||
TCA_SKBEDIT_PTYPE,
|
||||
__TCA_SKBEDIT_MAX
|
||||
};
|
||||
#define TCA_SKBEDIT_MAX (__TCA_SKBEDIT_MAX - 1)
|
||||
|
Reference in New Issue
Block a user