Hi Jarno,

On Sun, May 21, 2017 at 07:49:00PM +0300, Jarno Huuskonen wrote:
> Hi,
> 
> I noticed that ipv6 version of ipmask() converter is missing ?
> 
> I'm attaching an example implementation for ipv6mask (incomplete:
> missing at least documentation / lua) for comments.
> 
> Maybe instead of just working with one mask ipv6mask(converter) could
> take two arguments: first ipv6mask, second(optional) ipv4 mask applied to
> ipv4mapped ipv6 address(::ffff:1.2.3.4).

That could indeed be a good idea. Thinking a bit further, shouldn't we
extend the current ipmask to support an optional ipv6 mask as a second
argument (ie exactly what you did but with ipv6 optional instead of
ipv4) ? This would allow it to be used on any address. It would end
up like this :
  - ipv4 in => ipv4 out, using ipv4 mask
  - ipv4-in-ipv6 in => ipv4-in-ipv6 out, using ipv4 mask
  - ipv6 in => ipv6 out, using ipv6 mask

What do you think ?

BTW, I've merged your cleanup patch, no need to resend it.

Thanks,
Willy

Reply via email to