]> git.ipfire.org Git - thirdparty/iproute2.git/commit
devlink: make parsing of handle non-destructive to argv
authorJiri Pirko <jiri@nvidia.com>
Wed, 6 Sep 2023 11:11:09 +0000 (13:11 +0200)
committerDavid Ahern <dsahern@kernel.org>
Mon, 11 Sep 2023 15:16:16 +0000 (09:16 -0600)
commit5d9f42124ccd9696d835e42527020ae9fece92e6
treed214cf424e50e82f528301982762f245a9820a4f
parent158215c5367745eeecd17d3cb4e600c243982a72
devlink: make parsing of handle non-destructive to argv

Currently, handle parsing is destructive as the "\0" string ends are
being put in certain positions during parsing. That prevents it from
being used repeatedly. This is problematic with the follow-up patch
implementing dry-parsing. Fix by making a copy of handle argv during
parsing.

Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
devlink/devlink.c