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:
David Ahern 2017-02-16 08:58:58 -08:00 committed by Stephen Hemminger
parent 6a9783831c
commit b5377431df

View File

@ -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)