The xtables_strtoul() would cram a long long into a long.
The parse_int would try to cram a UINT64 into a long.
extern void xtables_register_target(struct xtables_target *me);
extern void xtables_register_targets(struct xtables_target *, unsigned int);
-extern bool xtables_strtoul(const char *, char **, unsigned long *,
+extern bool xtables_strtoul(const char *, char **, unsigned long long *,
unsigned long, unsigned long);
extern bool xtables_strtoui(const char *, char **, unsigned int *,
unsigned int, unsigned int);
* Returns true/false whether number was accepted. On failure, *value has
* undefined contents.
*/
-bool xtables_strtoul(const char *s, char **end, unsigned long *value,
+bool xtables_strtoul(const char *s, char **end, unsigned long long *value,
unsigned long min, unsigned long max)
{
unsigned long v;
bool xtables_strtoui(const char *s, char **end, unsigned int *value,
unsigned int min, unsigned int max)
{
- unsigned long v;
+ unsigned long long v;
bool ret;
ret = xtables_strtoul(s, end, &v, min, max);
{
const struct xt_option_entry *entry = cb->entry;
unsigned long long lmin = 0, lmax = UINT32_MAX;
- unsigned int value;
+ unsigned long long value;
if (entry->type == XTTYPE_UINT8)
lmax = UINT8_MAX;
if (cb->entry->max != 0)
lmax = cb->entry->max;
- if (!xtables_strtoui(cb->arg, NULL, &value, lmin, lmax))
+ if (!xtables_strtoul(cb->arg, NULL, &value, lmin, lmax))
xt_params->exit_err(PARAMETER_PROBLEM,
"%s: bad value for option \"--%s\", "
"or out of range (%llu-%llu).\n",