]> git.proxmox.com Git - mirror_iproute2.git/commit - tc/f_flower.c
tc: flower: document that *_ip parameters take a PREFIX as an argument.
authorSimon Horman <simon.horman@netronome.com>
Fri, 16 Dec 2016 13:54:36 +0000 (14:54 +0100)
committerStephen Hemminger <stephen@networkplumber.org>
Thu, 22 Dec 2016 00:07:41 +0000 (16:07 -0800)
commitb2a1f740aa4d37b0a15a1a8ea866a29d5fab4591
tree244f4ed50266d7a21ae9bc6c866d887c25f77e6f
parent8578bb731d15680a737056cd8ee30fba2d3e9edd
tc: flower: document that *_ip parameters take a PREFIX as an argument.

* The argument to src_ip, dst_ip, enc_src_ip and enc_dst_ip take an
  optional prefix length which is used to provide a mask to limit the scope
  of matching.
* This is documented as a PREFIX in keeping with ip-route(8).

Example of uses of IPv4 and IPv6 prefixes

tc qdisc add dev eth0 ingress
tc filter add dev eth0 protocol ip parent ffff: flower \
    indev eth0 dst_ip 192.168.1.1 action drop
tc filter add dev eth0 protocol ip parent ffff: flower \
    indev eth0 src_ip 10.0.0.0/8 action drop
tc filter add dev eth0 protocol ipv6 parent ffff: flower \
    indev eth0 src_ip 2001:DB8:1::/48 action drop
tc filter add dev eth0 protocol ipv6 parent ffff: flower \
    indev eth0 dst_ip 2001:DB8::1 action drop

Signed-off-by: Simon Horman <simon.horman@netronome.com>
man/man8/tc-flower.8
tc/f_flower.c