summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiří Klimeš <jklimes@redhat.com>2014-06-11 10:07:02 +0200
committerJiří Klimeš <jklimes@redhat.com>2014-06-11 10:07:02 +0200
commite70d5579af2269d5b034f0edc7c8459aed904bf2 (patch)
tree8f38c2c489bf37770db32cfca4370b56cac0788d
parent4e9fc8ad611dabf93e9b698a0ce3466bc5e27bb4 (diff)
downloadNetworkManager-e70d5579af2269d5b034f0edc7c8459aed904bf2.tar.gz
cli: don't accept prefix 0 for routes
-rw-r--r--cli/src/common.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/cli/src/common.c b/cli/src/common.c
index 272f4961b3..e6712a8d6a 100644
--- a/cli/src/common.c
+++ b/cli/src/common.c
@@ -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;
}