Re: [RFC PATCH 2/4] fib: add VRF functional and unit tests

Stephen Hemminger
2026-03-22T16:41:31Z

On Sun, 22 Mar 2026 15:42:13 +0000
Vladimir Medvedkin <vladimir.medvedkin@intel.com> wrote:

> + case 'V':
> + errno = 0;
> + config.nb_vrfs = strtoul(optarg, &endptr, 10);
> + /* VRF IDs are uint16_t, max valid VRF is 65535 */
> + if ((errno != 0) || (config.nb_vrfs == 0) ||
> + (config.nb_vrfs > UINT16_MAX)) {
> + print_usage();

Should also check endptr. Right now "-V1xx" would be accepted.