summaryrefslogtreecommitdiffstats
path: root/include/net/tc_act
diff options
context:
space:
mode:
authorJamal Hadi Salim <jhs@mojatatu.com>2016-07-02 12:43:15 +0200
committerDavid S. Miller <davem@davemloft.net>2016-07-05 00:11:14 +0200
commitff202ee1ed8f032f05b80b541664cf02e75d7080 (patch)
treea315c80d55d558549429ec8c297b9e21816083e4 /include/net/tc_act
parentnet: simplify and make pkt_type_ok() available for other users (diff)
downloadlinux-ff202ee1ed8f032f05b80b541664cf02e75d7080.tar.xz
linux-ff202ee1ed8f032f05b80b541664cf02e75d7080.zip
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>
Diffstat (limited to 'include/net/tc_act')
-rw-r--r--include/net/tc_act/tc_skbedit.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/include/net/tc_act/tc_skbedit.h b/include/net/tc_act/tc_skbedit.h
index b496d5ad7d42..d01a5d40cfb5 100644
--- a/include/net/tc_act/tc_skbedit.h
+++ b/include/net/tc_act/tc_skbedit.h
@@ -24,11 +24,11 @@
struct tcf_skbedit {
struct tcf_common common;
- u32 flags;
- u32 priority;
- u32 mark;
- u16 queue_mapping;
- /* XXX: 16-bit pad here? */
+ u32 flags;
+ u32 priority;
+ u32 mark;
+ u16 queue_mapping;
+ u16 ptype;
};
#define to_skbedit(a) \
container_of(a->priv, struct tcf_skbedit, common)