libxtables: min-max option support
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
diff --git a/xtoptions.c b/xtoptions.c
index 843395b..6a119ec 100644
--- a/xtoptions.c
+++ b/xtoptions.c
@@ -89,6 +89,11 @@
unsigned int lmin = 0, lmax = UINT32_MAX;
unsigned int value;
+ if (cb->entry->min != 0)
+ lmin = cb->entry->min;
+ if (cb->entry->max != 0)
+ lmax = cb->entry->max;
+
if (!xtables_strtoui(cb->arg, NULL, &value, lmin, lmax))
xt_params->exit_err(PARAMETER_PROBLEM,
"%s: bad value for option \"--%s\", "