summaryrefslogtreecommitdiffstats
path: root/kernel/include/uapi/linux/netfilter/ipset
diff options
context:
space:
mode:
authorVishwanath Pai <vpai@akamai.com>2022-11-10 16:30:26 -0500
committerJozsef Kadlecsik <kadlec@netfilter.org>2022-11-20 21:53:05 +0100
commitac8e3cfbafdcd0dbb97b2a1d0dcd093549820c69 (patch)
tree6bff3a5ce7d7aeb9e0cc72043295de6b926e616f /kernel/include/uapi/linux/netfilter/ipset
parentb9194d8cc41e8c0a028d98f2d2fb5d08552cf7f0 (diff)
netfilter: ipset: Add support for new bitmask parameter
Add a new parameter to complement the existing 'netmask' option. The main difference between netmask and bitmask is that bitmask takes any arbitrary ip address as input, it does not have to be a valid netmask. The name of the new parameter is 'bitmask'. This lets us mask out arbitrary bits in the ip address, for example: ipset create set1 hash:ip bitmask 255.128.255.0 ipset create set2 hash:ip,port family inet6 bitmask ffff::ff80 Signed-off-by: Vishwanath Pai <vpai@akamai.com> Signed-off-by: Joshua Hunt <johunt@akamai.com> Signed-off-by: Jozsef Kadlecsik <kadlec@netfilter.org>
Diffstat (limited to 'kernel/include/uapi/linux/netfilter/ipset')
-rw-r--r--kernel/include/uapi/linux/netfilter/ipset/ip_set.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/include/uapi/linux/netfilter/ipset/ip_set.h b/kernel/include/uapi/linux/netfilter/ipset/ip_set.h
index 6611612..b81f1ae 100644
--- a/kernel/include/uapi/linux/netfilter/ipset/ip_set.h
+++ b/kernel/include/uapi/linux/netfilter/ipset/ip_set.h
@@ -85,6 +85,7 @@ enum {
IPSET_ATTR_CADT_LINENO = IPSET_ATTR_LINENO, /* 9 */
IPSET_ATTR_MARK, /* 10 */
IPSET_ATTR_MARKMASK, /* 11 */
+ IPSET_ATTR_BITMASK, /* 12 */
/* Reserve empty slots */
IPSET_ATTR_CADT_MAX = 16,
/* Create-only specific attributes */
@@ -153,6 +154,7 @@ enum ipset_errno {
IPSET_ERR_COMMENT,
IPSET_ERR_INVALID_MARKMASK,
IPSET_ERR_SKBINFO,
+ IPSET_ERR_BITMASK_NETMASK_EXCL,
/* Type specific error codes */
IPSET_ERR_TYPE_SPECIFIC = 4352,