diff options
author | Sergey Popovich <popovich_sergei@mail.ua> | 2015-05-02 20:28:11 +0300 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2015-05-13 14:25:47 +0300 |
commit | cabfd139aa9863ebafe0bbba3f203d0c4e43e2cf (patch) | |
tree | b29fb123f91ab8f53b49abe0c11df94fceb7a585 /net/netfilter/ipset/ip_set_hash_ipmark.c | |
parent | d25472e4706329f595377aca38ccb664bdd14531 (diff) | |
download | linux-cabfd139aa9863ebafe0bbba3f203d0c4e43e2cf.tar.xz |
netfilter: ipset: Use HOST_MASK literal to represent host address CIDR len
Signed-off-by: Sergey Popovich <popovich_sergei@mail.ua>
Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/netfilter/ipset/ip_set_hash_ipmark.c')
-rw-r--r-- | net/netfilter/ipset/ip_set_hash_ipmark.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/netfilter/ipset/ip_set_hash_ipmark.c b/net/netfilter/ipset/ip_set_hash_ipmark.c index 82ef5b3d9afc..4499373ef8aa 100644 --- a/net/netfilter/ipset/ip_set_hash_ipmark.c +++ b/net/netfilter/ipset/ip_set_hash_ipmark.c @@ -149,7 +149,7 @@ hash_ipmark4_uadt(struct ip_set *set, struct nlattr *tb[], } else if (tb[IPSET_ATTR_CIDR]) { u8 cidr = nla_get_u8(tb[IPSET_ATTR_CIDR]); - if (!cidr || cidr > 32) + if (!cidr || cidr > HOST_MASK) return -IPSET_ERR_INVALID_CIDR; ip_set_mask_from_to(ip, ip_to, cidr); } |