]> git.ipfire.org Git - thirdparty/iproute2.git/commit
tc: add support for connmark action
authorFelix Fietkau <nbd@openwrt.org>
Sun, 15 Feb 2015 16:57:19 +0000 (11:57 -0500)
committerStephen Hemminger <shemming@brocade.com>
Mon, 13 Apr 2015 17:49:45 +0000 (10:49 -0700)
commitb8d5c9a71bfba87405e6d169760dd8db41a4bbdf
treead66043d2ad0802094b70ac96d37a6895fecea5d
parent94f665387e31233d77c6aba8ad8264265cd6f166
tc: add support for connmark action

Add ability to add the netfilter connmark support.

Typical usage:
...lets tag outgoing icmp with mark 0x10..
iptables -tmangle -A PREROUTING -p icmp -j CONNMARK --set-mark 0x10
..add on ingress of $ETH an extractor for connmark...
tc filter add dev $ETH parent ffff: prio 4 protocol ip \
u32 match ip protocol 1 0xff \
flowid 1:1 \
action connmark continue
...if the connmark was 0x11, we police to a ridic rate of 10Kbps
tc filter add dev $ETH parent ffff: prio 5 protocol ip \
handle 0x11 fw flowid 1:1 \
action police rate 10kbit burst 10k

Other ways to use the connmark is to supply the zone, index and
branching choice. Refer to help.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
tc/Makefile
tc/m_connmark.c [new file with mode: 0644]