summaryrefslogtreecommitdiffstats
path: root/extensions/libxt_conntrack.c
diff options
context:
space:
mode:
authorJan Engelhardt <jengelh@medozas.de>2009-01-27 18:43:01 +0100
committerJan Engelhardt <jengelh@medozas.de>2009-01-27 23:14:30 +0100
commit5f2922cfc0bbfbeb878f5c12e9fb3eb602ae5507 (patch)
treed0fc6078218d3729279e0d47d3a766fcffdeab9d /extensions/libxt_conntrack.c
parent39bf9c8214d3073a496a8a1eff91046a8d6fbbdf (diff)
libxtables: prefix/order - strtoui
This commit also throws out the redundant string_to_number_*. Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Diffstat (limited to 'extensions/libxt_conntrack.c')
-rw-r--r--extensions/libxt_conntrack.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/extensions/libxt_conntrack.c b/extensions/libxt_conntrack.c
index 532f5eee..2b98ab02 100644
--- a/extensions/libxt_conntrack.c
+++ b/extensions/libxt_conntrack.c
@@ -228,7 +228,7 @@ parse_expire(const char *s)
{
unsigned int len;
- if (string_to_number(s, 0, 0, &len) == -1)
+ if (!xtables_strtoui(s, NULL, &len, 0, UINT32_MAX))
exit_error(PARAMETER_PROBLEM, "expire value invalid: `%s'\n", s);
else
return len;
@@ -268,11 +268,11 @@ conntrack_ps_expires(struct xt_conntrack_mtinfo1 *info, const char *s)
unsigned int min, max;
char *end;
- if (!strtonum(s, &end, &min, 0, ~0))
+ if (!xtables_strtoui(s, &end, &min, 0, UINT32_MAX))
param_act(P_BAD_VALUE, "conntrack", "--expires", s);
max = min;
if (*end == ':')
- if (!strtonum(s, &end, &max, 0, UINT32_MAX))
+ if (!xtables_strtoui(s, &end, &max, 0, UINT32_MAX))
param_act(P_BAD_VALUE, "conntrack", "--expires", s);
if (*end != '\0')
param_act(P_BAD_VALUE, "conntrack", "--expires", s);
@@ -481,7 +481,7 @@ conntrack_mt_parse(int c, char **argv, int invert, unsigned int *flags,
break;
case 'a': /* --ctorigsrcport */
- if (!strtonum(optarg, NULL, &port, 0, UINT16_MAX))
+ if (!xtables_strtoui(optarg, NULL, &port, 0, UINT16_MAX))
param_act(P_BAD_VALUE, "conntrack",
"--ctorigsrcport", optarg);
info->match_flags |= XT_CONNTRACK_ORIGSRC_PORT;
@@ -491,7 +491,7 @@ conntrack_mt_parse(int c, char **argv, int invert, unsigned int *flags,
break;
case 'b': /* --ctorigdstport */
- if (!strtonum(optarg, NULL, &port, 0, UINT16_MAX))
+ if (!xtables_strtoui(optarg, NULL, &port, 0, UINT16_MAX))
param_act(P_BAD_VALUE, "conntrack",
"--ctorigdstport", optarg);
info->match_flags |= XT_CONNTRACK_ORIGDST_PORT;
@@ -501,7 +501,7 @@ conntrack_mt_parse(int c, char **argv, int invert, unsigned int *flags,
break;
case 'c': /* --ctreplsrcport */
- if (!strtonum(optarg, NULL, &port, 0, UINT16_MAX))
+ if (!xtables_strtoui(optarg, NULL, &port, 0, UINT16_MAX))
param_act(P_BAD_VALUE, "conntrack",
"--ctreplsrcport", optarg);
info->match_flags |= XT_CONNTRACK_REPLSRC_PORT;
@@ -511,7 +511,7 @@ conntrack_mt_parse(int c, char **argv, int invert, unsigned int *flags,
break;
case 'd': /* --ctrepldstport */
- if (!strtonum(optarg, NULL, &port, 0, UINT16_MAX))
+ if (!xtables_strtoui(optarg, NULL, &port, 0, UINT16_MAX))
param_act(P_BAD_VALUE, "conntrack",
"--ctrepldstport", optarg);
info->match_flags |= XT_CONNTRACK_REPLDST_PORT;