[RFC PATCH 2/4] fib: add VRF functional and unit tests
Stephen Hemminger
stephen at networkplumber.org
Sun Mar 22 17:41:19 CET 2026
On Sun, 22 Mar 2026 15:42:13 +0000
Vladimir Medvedkin <vladimir.medvedkin at 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.
More information about the dev
mailing list