Go to file
Roi Dayan 7f70eb2a8b tc_util: Fix parsing action control with space and slash
For action police there is an conform-exceed action control
which can be for example "jump 2 / pipe".
The current parsing loop is doing one more iteration than necessary
and results in ok var being 3.

Example filter:

tc filter add dev enp8s0f0_0 ingress protocol ip prio 2 flower \
    verbose action police rate 100mbit burst 12m \
    conform-exceed jump 1 / pipe mirred egress redirect dev enp8s0f0_1 action drop

Before this change the command will fail.
Trying to add another "pipe" before mirred as a workaround for the stopping the loop
in ok var 3 resulting in result2 not being saved and wrong filter.

... conform-exceed jump 1 / pipe pipe mirred ...

Example dump of the action part:
... action order 1:  police 0x1 rate 100Mbit burst 12Mb mtu 2Kb action jump 1 overhead 0b  ...

Fix the behavior by removing redundant case 2 handling, either argc is over or breaking.

Example dump of the action part with the fix:
... action order 1:  police 0x1 rate 100Mbit burst 12Mb mtu 2Kb action jump 1/pipe overhead 0b ...

Signed-off-by: Roi Dayan <roid@nvidia.com>
Reviewed-by: Maor Dickman <maord@nvidia.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2022-02-10 17:20:42 -08:00
bash-completion devlink: add support for port params get/set 2021-02-11 09:21:24 -07:00
bridge Merge branch 'main' into next 2021-10-09 17:47:47 -06:00
dcb dcb: app: Add missing "dcb app show dev X default-prio" 2022-01-26 20:22:47 -08:00
devlink Merge branch 'main' into next 2021-11-04 09:45:31 -06:00
doc/actions Fix some typos detected by Lintian in manpages 2021-11-09 10:45:44 -08:00
etc/iproute2 Add Open/R to rt_protos 2021-03-30 03:04:09 +00:00
examples/bpf examples/bpf: add bpf examples with BTF defined maps 2020-11-24 22:14:08 -07:00
genl genl: ctrl: print op -> policy idx mapping 2020-10-11 20:10:09 -06:00
include uapi: update kernel headers from 5.17-rc1 2022-01-24 09:55:39 -08:00
ip iprule: Allow option dsfield in 'ip rule show' 2022-02-01 12:56:30 -08:00
lib lib: fix ax25.h include for musl 2022-01-15 10:41:13 -08:00
man man: Fix a typo in the flag documentation of ip address 2022-01-28 09:21:46 -08:00
misc ss: use freecon() instead of free() when appropriate 2022-01-31 14:37:25 -08:00
netem doc: remove trailing whitespace 2018-12-19 12:02:38 -08:00
rdma rdma: Don't allocate sparse array 2022-01-11 09:19:27 -07:00
schema bridge: add json schema for bridge fdb show 2016-07-20 12:02:02 -07:00
tc tc_util: Fix parsing action control with space and slash 2022-02-10 17:20:42 -08:00
testsuite iprule: Allow option dsfield in 'ip rule show' 2022-02-01 12:56:30 -08:00
tipc tipc: bail out if key is abnormally long 2021-05-09 22:08:47 +00:00
vdpa Merge branch 'main' into next 2022-01-11 09:16:35 -07:00
.clang-format clang-format: add configuration file 2019-01-17 13:38:23 -08:00
.gitignore Remove leftovers from removed Latex documentation 2018-02-13 16:43:19 -08:00
.mailmap mailmap: map David's mail address 2019-05-15 09:50:42 -07:00
configure configure: add the --libdir option 2021-10-15 17:57:20 -06:00
COPYING Update address of FSF in license 2008-03-08 13:31:03 -08:00
Makefile configure: add the --libdir option 2021-10-15 17:57:20 -06:00
README README: remove doc instructions 2021-03-20 09:29:02 -07:00
README.devel README: update location of git repositories, remove broken info link 2018-02-13 16:42:51 -08:00

This is a set of utilities for Linux networking.

Information:
    https://wiki.linuxfoundation.org/networking/iproute2

Download:
    http://www.kernel.org/pub/linux/utils/net/iproute2/

Stable version repository:
    git://git.kernel.org/pub/scm/network/iproute2/iproute2.git

Development repository:
    git://git.kernel.org/pub/scm/network/iproute2/iproute2-next.git

How to compile this.
--------------------
1. libdbm

arpd needs to have the berkeleydb development libraries. For Debian
users this is the package with a name like libdbX.X-dev.
DBM_INCLUDE points to the directory with db_185.h which
is the include file used by arpd to get to the old format Berkeley
database routines.  Often this is in the db-devel package.

2. make

The makefile will automatically build a config.mk file which
contains definitions of libraries that may or may not be available
on the system such as: ATM, ELF, MNL, and SELINUX.

3. include/uapi

This package includes matching sanitized kernel headers because
the build environment may not have up to date versions. See Makefile
if you have special requirements and need to point at different
kernel include files.

Stephen Hemminger
stephen@networkplumber.org

Alexey Kuznetsov
kuznet@ms2.inr.ac.ru