Re: [PATCH v3 0/6] netfilter: ipset: Add support for new bitmask parameter (userspace)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Vishwanath,

On Thu, 10 Nov 2022, Vishwanath Pai wrote:

> 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
> 
> This patchset contains userspace patches, I will submit the kernel patch
> separately.
> 
> Changes in v3:
> * Add netmask option to hash:net,net
> * Update man page for hash:net,net
> * Add netmask tests to hash:net,net
> * Add check in userspace to make sure netmask and bitmask options are mutually exclusive
> * Add a test to make sure netmask/bitmask are mutually exclusive
> 
> Changes in v2:
>     * Removed the changes to nf_inet_addr.h and nfproto.h, this will break on older kernels
>     * Remove bitmask option from net,net since it is redundant, update the manpage
>     * Add tests for the new bitmask param (similar to netmask tests)
> 
> Vishwanath Pai (6):
>   netfilter: ipset: Add support for new bitmask parameter
>   netfilter: ipset: Add bitmask support to hash:ip
>   netfilter: ipset: Add bitmask support to hash:ipport
>   netfilter: ipset: Add bitmask support to hash:netnet
>   netfilter: ipset: Update the man page to include netmask/bitmask
>     options
>   netfilter: ipset: add tests for the new bitmask feature

The patches including the kernel side one have been applied to the ipset 
git repo and I'm about to submit the kernel patch for kernel inclusion. 
Thanks!

Best regards,
Jozsef
-
E-mail  : kadlec@xxxxxxxxxxxxxxxxx, kadlecsik.jozsef@xxxxxxxxx
PGP key : https://wigner.hu/~kadlec/pgp_public_key.txt
Address : Wigner Research Centre for Physics
          H-1525 Budapest 114, POB. 49, Hungary



[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux