History

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

Jamal Hadi Salim committed 10 years ago

Commit ff202ee1 parent 8b10cab3 files · +24 −6Browse files

Showing the changes to include/uapi (1 of 3 files). Show all

Unified · Split

include/uapi/linux/tc_act/tc_skbedit.h+2−0
@@ -27,6 +27,7 @@ · 26 unmodified lines
2727 #define SKBEDIT_F_PRIORITY 0x1
2828 #define SKBEDIT_F_QUEUE_MAPPING 0x2
2929 #define SKBEDIT_F_MARK 0x4
30+#define SKBEDIT_F_PTYPE 0x8
3031
3132 struct tc_skbedit {
3233 tc_gen;
@@ -40,6 +41,7 @@ enum { · 7 unmodified lines
4041 TCA_SKBEDIT_QUEUE_MAPPING,
4142 TCA_SKBEDIT_MARK,
4243 TCA_SKBEDIT_PAD,
44+ TCA_SKBEDIT_PTYPE,
4345 __TCA_SKBEDIT_MAX
4446 };
4547 #define TCA_SKBEDIT_MAX (__TCA_SKBEDIT_MAX - 1)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t