]> git.proxmox.com Git - mirror_iproute2.git/commit
devlink: fix referencing namespace by PID
authorJakub Kicinski <jakub.kicinski@netronome.com>
Tue, 5 Nov 2019 21:17:05 +0000 (13:17 -0800)
committerDavid Ahern <dsahern@gmail.com>
Sat, 9 Nov 2019 00:39:03 +0000 (00:39 +0000)
commit9a0a2fcbf45b992a406c84d2dbd331a10cf437c2
tree6e7a57f2fae672bf45d046c47bf594dc02b84cc2
parent081140bbc43df11da5cc3f520f8473468094b60b
devlink: fix referencing namespace by PID

netns parameter for devlink reload is supposed to take PID
as well as string name. However, the PID parsing has two
bugs:
 - the opts->netns member is unsigned so the < 0
   condition is always false;
 - the parameter list is not rewinded after parsing as
   a name, so parsing as a pid uses the wrong argument.

Fixes: 08e8e1ca3e05 ("devlink: extend reload command to add support for network namespace change")
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David Ahern <dsahern@gmail.com>
devlink/devlink.c