diff options
| author | Jamal Hadi Salim <jhs@mojatatu.com> | 2016-07-02 06:43:15 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2016-07-04 18:11:14 -0400 |
| commit | ff202ee1ed8f032f05b80b541664cf02e75d7080 (patch) | |
| tree | a315c80d55d558549429ec8c297b9e21816083e4 /include/uapi/linux | |
| parent | 8b10cab64c134ffbffac96edd1899d303d3afcac (diff) | |
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/uapi/linux')
| -rw-r--r-- | include/uapi/linux/tc_act/tc_skbedit.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/uapi/linux/tc_act/tc_skbedit.h b/include/uapi/linux/tc_act/tc_skbedit.h index fecb5cc48c40..a4d00c608d8f 100644 --- a/include/uapi/linux/tc_act/tc_skbedit.h +++ b/include/uapi/linux/tc_act/tc_skbedit.h | |||
| @@ -27,6 +27,7 @@ | |||
| 27 | #define SKBEDIT_F_PRIORITY 0x1 | 27 | #define SKBEDIT_F_PRIORITY 0x1 |
| 28 | #define SKBEDIT_F_QUEUE_MAPPING 0x2 | 28 | #define SKBEDIT_F_QUEUE_MAPPING 0x2 |
| 29 | #define SKBEDIT_F_MARK 0x4 | 29 | #define SKBEDIT_F_MARK 0x4 |
| 30 | #define SKBEDIT_F_PTYPE 0x8 | ||
| 30 | 31 | ||
| 31 | struct tc_skbedit { | 32 | struct tc_skbedit { |
| 32 | tc_gen; | 33 | tc_gen; |
| @@ -40,6 +41,7 @@ enum { | |||
| 40 | TCA_SKBEDIT_QUEUE_MAPPING, | 41 | TCA_SKBEDIT_QUEUE_MAPPING, |
| 41 | TCA_SKBEDIT_MARK, | 42 | TCA_SKBEDIT_MARK, |
| 42 | TCA_SKBEDIT_PAD, | 43 | TCA_SKBEDIT_PAD, |
| 44 | TCA_SKBEDIT_PTYPE, | ||
| 43 | __TCA_SKBEDIT_MAX | 45 | __TCA_SKBEDIT_MAX |
| 44 | }; | 46 | }; |
| 45 | #define TCA_SKBEDIT_MAX (__TCA_SKBEDIT_MAX - 1) | 47 | #define TCA_SKBEDIT_MAX (__TCA_SKBEDIT_MAX - 1) |
