Using ranges in --ctexpire results in a parsing error:
conntrack: Bad value for "--expires" option: "1:1000"
The first value is parsed twice, after which the end pointer doesn't
point to the expected '\0' but to the colon.
Signed-off-by: Patrick McHardy <kaber@trash.net>
xtables_param_act(XTF_BAD_VALUE, "conntrack", "--expires", s);
max = min;
if (*end == ':')
- if (!xtables_strtoui(s, &end, &max, 0, UINT32_MAX))
+ if (!xtables_strtoui(end + 1, &end, &max, 0, UINT32_MAX))
xtables_param_act(XTF_BAD_VALUE, "conntrack", "--expires", s);
if (*end != '\0')
xtables_param_act(XTF_BAD_VALUE, "conntrack", "--expires", s);