]> git.ipfire.org Git - thirdparty/ipset.git/commit
netfilter: ipset: Add support for new bitmask parameter
authorVishwanath Pai <vpai@akamai.com>
Thu, 10 Nov 2022 21:31:26 +0000 (16:31 -0500)
committerJozsef Kadlecsik <kadlec@netfilter.org>
Sun, 20 Nov 2022 20:56:15 +0000 (21:56 +0100)
commitb50666c0973336f6341dd74288352d2f611d7430
treebf65dbf9085e50dbbcd241771f20ad74640e3473
parentac8e3cfbafdcd0dbb97b2a1d0dcd093549820c69
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>
include/libipset/args.h
include/libipset/data.h
include/libipset/linux_ip_set.h
include/libipset/parse.h
lib/args.c
lib/data.c
lib/debug.c
lib/errcode.c
lib/parse.c
lib/print.c
lib/session.c