From: Jozsef Kadlecsik Date: Sat, 17 Aug 2013 19:12:53 +0000 (+0200) Subject: Remove artifical restriction of netmask values for hash:ip type. X-Git-Tag: v6.20~32 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3a4419954a3ae0ba5dafd711e6b8dd8f0beb5c21;p=thirdparty%2Fipset.git Remove artifical restriction of netmask values for hash:ip type. Reported by Quentin Armitage, closes netfilter bugzilla id #844. --- diff --git a/lib/parse.c b/lib/parse.c index 6df8f206..ce3548d3 100644 --- a/lib/parse.c +++ b/lib/parse.c @@ -1591,16 +1591,14 @@ ipset_parse_netmask(struct ipset_session *session, ipset_data_set(data, IPSET_OPT_FAMILY, &family); } - err = string_to_cidr(session, str, - family == NFPROTO_IPV4 ? 1 : 4, - family == NFPROTO_IPV4 ? 31 : 124, + err = string_to_cidr(session, str, 1, + family == NFPROTO_IPV4 ? 32 : 128, &cidr); if (err) return syntax_err("netmask is out of the inclusive range " - "of %u-%u", - family == NFPROTO_IPV4 ? 1 : 4, - family == NFPROTO_IPV4 ? 31 : 124); + "of 1-%u", + family == NFPROTO_IPV4 ? 32 : 128); return ipset_data_set(data, opt, &cidr); }