mirror of
https://git.kernel.org/pub/scm/network/iproute2/iproute2.git
synced 2024-12-11 10:51:39 +08:00
ip vrf: Detect invalid vrf name in pids command
Verify VRF name is valid before attempting to read cgroups files. Signed-off-by: David Ahern <dsa@cumulusnetworks.com>
This commit is contained in:
parent
6a9783831c
commit
b5377431df
@ -212,6 +212,10 @@ static int ipvrf_pids(int argc, char **argv)
|
||||
}
|
||||
|
||||
vrf = argv[0];
|
||||
if (!name_is_vrf(vrf)) {
|
||||
fprintf(stderr, "Invalid VRF name\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
mnt = find_cgroup2_mount();
|
||||
if (!mnt)
|
||||
|
Loading…
Reference in New Issue
Block a user