]> git.baikalelectronics.ru Git - kernel.git/commit
net sched actions: skbedit add support for mod-ing skb pkt_type
authorJamal Hadi Salim <jhs@mojatatu.com>
Sat, 2 Jul 2016 10:43:15 +0000 (06:43 -0400)
committerDavid S. Miller <davem@davemloft.net>
Mon, 4 Jul 2016 22:11:14 +0000 (15:11 -0700)
commit659c0e8ff987a744450eac6b911937e2a8948134
treea315c80d55d558549429ec8c297b9e21816083e4
parentc012acdec217d234b6847eb047317bb29542553a
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>
include/net/tc_act/tc_skbedit.h
include/uapi/linux/tc_act/tc_skbedit.h
net/sched/act_skbedit.c