]> git.proxmox.com Git - mirror_iproute2.git/commit
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>
Wed, 21 Dec 2016 23:56:39 +0000 (15:56 -0800)
commita8a1dccd2af957077aa9d975db979c39d571bb6c
tree7fe6781962320e3538e5e96e7224be3cbdc7faa9
parentee9369a05f5e6e0bcece4556a3e93109d9277071
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