diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2006-11-29 13:32:32 +0000 |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2006-11-29 13:32:32 +0000 |
commit | 267a57007e69d8f316dea80f79ce2560459e0c30 (patch) | |
tree | 830cf99ea2a64617d3e8f3324548cf6dbecacba4 /extensions/libipt_NETMAP.c | |
parent | 2ac1fadaf8a2915c1c0ac66c98edc2f36f8df4ed (diff) |
Fix /etc/network usage (Pablo Neira)
http://bugs.debian.org/398082
iptables 1.3.5 and 1.3.6 appear to read /etc/networks, but the
information is lost somewhere with 1.3.6.
# cat /etc/networks
foonet 10.0.0.0
# strace -s 255 -o /tmp/foo iptables -v -A INPUT -s foonet/8 -j
ACCEPT #1.3.5 [1]
ACCEPT all opt -- in * out * 10.0.0.0/8 -> 0.0.0.0/0
# strace -s 255 -o /tmp/bar iptables -v -A INPUT -s foonet/8 -j
ACCEPT #1.3.6 [2]
iptables v1.3.6: host/network `foonet.0.0.0' not found
Try `iptables -h' or 'iptables --help' for more information.
1. http://people.debian.org/~ljlane/stuff/strace-iptables-1.3.5.txt
2. http://people.debian.org/~ljlane/stuff/strace-iptables-1.3.6.txt
Diffstat (limited to 'extensions/libipt_NETMAP.c')
-rw-r--r-- | extensions/libipt_NETMAP.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/extensions/libipt_NETMAP.c b/extensions/libipt_NETMAP.c index a39c731e..8cecb4d3 100644 --- a/extensions/libipt_NETMAP.c +++ b/extensions/libipt_NETMAP.c @@ -86,7 +86,7 @@ parse_to(char *arg, struct ip_nat_range *range) range->min_ip = ip->s_addr; if (slash) { if (strchr(slash+1, '.')) { - ip = dotted_to_addr(slash+1); + ip = dotted_to_mask(slash+1); if (!ip) exit_error(PARAMETER_PROBLEM, "Bad netmask `%s'\n", slash+1); |