iproute2/devlink
Moshe Shemesh 047e9ae516 devlink: Fix cmd_dev_param_set() to check configuration mode
This patch is fixing a bug, when param set user command includes
configuration mode which is not supported, the tool may not respond
with error if the requested value is 0. In such case
cmd_dev_param_set_cb() won't find the requested configuration mode and
returns ctx->value as initialized (equal 0). Then cmd_dev_param_set()
may find that requested value equals current value and returns success.

Fixing the bug by adding a flag cmode_found which is set only if
cmd_dev_param_set_cb() finds the requested configuration mode.

Fixes: 13925ae9eb ("devlink: Add param command support")
Signed-off-by: Moshe Shemesh <moshe@nvidia.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2021-11-02 08:34:33 -07:00
..
.gitignore devlink: ignore build result 2016-04-11 13:35:12 -07:00
Makefile devlink: Fix link errors on some systems 2021-06-26 14:57:27 -07:00
devlink.c devlink: Fix cmd_dev_param_set() to check configuration mode 2021-11-02 08:34:33 -07:00
mnlg.c devlink: Use generic socket helpers from library 2021-03-03 04:00:10 +00:00
mnlg.h devlink: Use generic socket helpers from library 2021-03-03 04:00:10 +00:00