]> git.ipfire.org Git - thirdparty/iproute2.git/commit
tc/cls_flower: Classify packet in ip tunnels
authorAmir Vadai <amir@vadai.me>
Fri, 2 Dec 2016 11:25:14 +0000 (13:25 +0200)
committerStephen Hemminger <stephen@networkplumber.org>
Fri, 2 Dec 2016 22:12:09 +0000 (14:12 -0800)
commitbb9b63b18e85f17e618469ecb139e78ca5a4a4fc
treee3d534d23d86f32f0620b5085f42ba798211b788
parentaab0f61043098e1384b5161ba78f583599a87e12
tc/cls_flower: Classify packet in ip tunnels

Introduce classifying by metadata extracted by the tunnel device.
Outer header fields - source/dest ip and tunnel id, are extracted from
the metadata when classifying.

For example, the following will add a filter on the ingress Qdisc of shared
vxlan device named 'vxlan0'. To forward packets with outer src ip
11.11.0.2, dst ip 11.11.0.1 and tunnel id 11. The packets will be
forwarded to tap device 'vnet0':

$ tc filter add dev vxlan0 protocol ip parent ffff: \
    flower \
      enc_src_ip 11.11.0.2 \
      enc_dst_ip 11.11.0.1 \
      enc_key_id 11 \
      dst_ip 11.11.11.1 \
    action mirred egress redirect dev vnet0

Signed-off-by: Amir Vadai <amir@vadai.me>
man/man8/tc-flower.8
tc/f_flower.c