[dnsdist] addMasks() or addMasksFromFile() to make dealing with multiple addresses easier ?

Remi Gacogne remi.gacogne at powerdns.com
Thu Jun 1 09:02:03 UTC 2017


On 06/01/2017 03:40 AM, scott McGillivray wrote:> I want to use
addMask() but i have 80+ /32 addresses that i need to
> add which means i have the matching number of lines like this

Well, since the configuration is in Lua, you can easily declare a list
and iterate over it.

> I was wondering if addMasks() would be a good addition ? So it would
> be like this..
> 
> v:addMask("x.x.x.x/32", "x.x.x.x/32", "x.x.x.x/32", "x.x.x.x/32",
> "x.x.x.x/32", "x.x.x.x/32", "x.x.x.x/32")

We already have NetmaskGroup:addMasks() version that takes a slightly
different kind of map, because it has be designed to be used with the
exceed* functions.

> Or even addMasksFromFile() so the addresses could be populated more
> easily from external source ?

I'm not sure it makes sense since it can already be done in Lua, and I
wouldn't want to end up with a fromFile() method for every object.

-- 
Remi Gacogne
PowerDNS.COM BV - https://www.powerdns.com/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://mailman.powerdns.com/pipermail/dnsdist/attachments/20170601/f2b2f83f/attachment.sig>


More information about the dnsdist mailing list