mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-05 01:50:25 +01:00
cli: don't accept prefix 0 for routes
This commit is contained in:
parent
4e9fc8ad61
commit
e70d5579af
1 changed files with 2 additions and 2 deletions
|
|
@ -554,9 +554,9 @@ _parse_and_build_route (int family,
|
|||
}
|
||||
|
||||
if (plen) {
|
||||
if (!nmc_string_to_int (plen, TRUE, 0, max_prefix, &out->prefix)) {
|
||||
if (!nmc_string_to_int (plen, TRUE, 1, max_prefix, &out->prefix)) {
|
||||
g_set_error (error, NMCLI_ERROR, NMC_RESULT_ERROR_USER_INPUT,
|
||||
_("invalid prefix '%s'; <0-%d> allowed"),
|
||||
_("invalid prefix '%s'; <1-%d> allowed"),
|
||||
plen, max_prefix);
|
||||
goto finish;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue