diff options
author | Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> | 2011-05-23 10:56:14 +0200 |
---|---|---|
committer | Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> | 2011-05-23 10:56:14 +0200 |
commit | 9a84755e05850a1faab80b5c4b5e5449f9c3c88d (patch) | |
tree | 4b851e7c816f61f324d9378fc4ac6203eb6cca51 /kernel/net/netfilter/ipset/ip_set_hash_netport.c | |
parent | 6b71deec45bd5cd40df92a7ebca2a6666cda203b (diff) |
Use unified from/to address masking and check the usage
Diffstat (limited to 'kernel/net/netfilter/ipset/ip_set_hash_netport.c')
-rw-r--r-- | kernel/net/netfilter/ipset/ip_set_hash_netport.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/kernel/net/netfilter/ipset/ip_set_hash_netport.c b/kernel/net/netfilter/ipset/ip_set_hash_netport.c index 3001030..90adc2c 100644 --- a/kernel/net/netfilter/ipset/ip_set_hash_netport.c +++ b/kernel/net/netfilter/ipset/ip_set_hash_netport.c @@ -245,8 +245,7 @@ hash_netport4_uadt(struct ip_set *set, struct nlattr *tb[], if (ip + UINT_MAX == ip_to) return -IPSET_ERR_HASH_RANGE; } else { - ip &= ip_set_hostmask(data.cidr); - ip_to = ip | ~ip_set_hostmask(data.cidr); + ip_set_mask_from_to(ip, ip_to, data.cidr); } if (retried) |