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
Showing the changes to include/uapi (1 of 3 files). Show all
Unified · Split
| @@ -27,6 +27,7 @@ · 26 unmodified lines | ||
| 27 | 27 | #define SKBEDIT_F_PRIORITY 0x1 |
| 28 | 28 | #define SKBEDIT_F_QUEUE_MAPPING 0x2 |
| 29 | 29 | #define SKBEDIT_F_MARK 0x4 |
| 30 | +#define SKBEDIT_F_PTYPE 0x8 | |
| 30 | 31 | |
| 31 | 32 | struct tc_skbedit { |
| 32 | 33 | tc_gen; |
| @@ -40,6 +41,7 @@ enum { · 7 unmodified lines | ||
| 40 | 41 | TCA_SKBEDIT_QUEUE_MAPPING, |
| 41 | 42 | TCA_SKBEDIT_MARK, |
| 42 | 43 | TCA_SKBEDIT_PAD, |
| 44 | + TCA_SKBEDIT_PTYPE, | |
| 43 | 45 | __TCA_SKBEDIT_MAX |
| 44 | 46 | }; |
| 45 | 47 | #define TCA_SKBEDIT_MAX (__TCA_SKBEDIT_MAX - 1) |