summaryrefslogtreecommitdiff
path: root/net/netfilter/ipset/ip_set_hash_ip.c
diff options
context:
space:
mode:
authorJozsef Kadlecsik <kadlec@blackhole.kfki.hu>2011-06-16 18:55:58 +0200
committerPatrick McHardy <kaber@trash.net>2011-06-16 18:55:58 +0200
commite6146e8684ed6dd4c0ff85ca21bf4324114fbbfa (patch)
tree31ca70199cdfeb5705a119a510414704c64f0f3e /net/netfilter/ipset/ip_set_hash_ip.c
parentf3dfd1538f26f1ecf86daaf3d0c321d87e5de041 (diff)
netfilter: ipset: use unified from/to address masking and check the usage
Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'net/netfilter/ipset/ip_set_hash_ip.c')
-rw-r--r--net/netfilter/ipset/ip_set_hash_ip.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/netfilter/ipset/ip_set_hash_ip.c b/net/netfilter/ipset/ip_set_hash_ip.c
index c3bc06d353d3..bdb432e22a8a 100644
--- a/net/netfilter/ipset/ip_set_hash_ip.c
+++ b/net/netfilter/ipset/ip_set_hash_ip.c
@@ -177,8 +177,7 @@ hash_ip4_uadt(struct ip_set *set, struct nlattr *tb[],
if (cidr > 32)
return -IPSET_ERR_INVALID_CIDR;
- ip &= ip_set_hostmask(cidr);
- ip_to = ip | ~ip_set_hostmask(cidr);
+ ip_set_mask_from_to(ip, ip_to, cidr);
} else
ip_to = ip;