]> git.proxmox.com Git - mirror_iproute2.git/commit
tc: flower: support multiple MPLS LSE match
authorGuillaume Nault <gnault@redhat.com>
Wed, 1 Jul 2020 19:49:18 +0000 (21:49 +0200)
committerStephen Hemminger <stephen@networkplumber.org>
Mon, 6 Jul 2020 18:12:43 +0000 (11:12 -0700)
commiteb09a15c12fb597de39303c8bc327d17eb04126b
tree7692854a634bf84fd87fceac0b1fb4293256d9eb
parenta6c5c952ab2e0e94eb937b1235649978e22e8125
tc: flower: support multiple MPLS LSE match

Add the new "mpls" keyword that can be used to match MPLS fields in
arbitrary Label Stack Entries.
LSEs are introduced by the "lse" keyword and followed by LSE options:
"depth", "label", "tc", "bos" and "ttl". The depth is manadtory, the
other options are optionals.

For example, the following filter drops MPLS packets having two labels,
where the first label is 21 and has TTL 64 and the second label is 22:

$ tc filter add dev ethX ingress proto mpls_uc flower mpls \
    lse depth 1 label 21 ttl 64 \
    lse depth 2 label 22 bos 1 \
    action drop

Signed-off-by: Guillaume Nault <gnault@redhat.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
man/man8/tc-flower.8
tc/f_flower.c