summaryrefslogtreecommitdiffstats
path: root/extensions/libipt_NETMAP.c
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/libipt_NETMAP.c')
-rw-r--r--extensions/libipt_NETMAP.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/extensions/libipt_NETMAP.c b/extensions/libipt_NETMAP.c
index 4cd7abc1..7d5ad04f 100644
--- a/extensions/libipt_NETMAP.c
+++ b/extensions/libipt_NETMAP.c
@@ -74,7 +74,7 @@ parse_to(char *arg, struct ip_nat_range *range)
char *slash;
struct in_addr *ip;
u_int32_t netmask;
- int bits;
+ unsigned int bits;
range->flags |= IP_NAT_RANGE_MAP_IPS;
slash = strchr(arg, '/');
@@ -95,7 +95,7 @@ parse_to(char *arg, struct ip_nat_range *range)
netmask = ip->s_addr;
}
else {
- if ((bits = string_to_number(slash+1, 0, 32)) == -1)
+ if (string_to_number(slash+1, 0, 32, &bits) == -1)
exit_error(PARAMETER_PROBLEM, "Bad netmask `%s'\n",
slash+1);
netmask = bits2netmask(bits);