Hi,

On Sat, Jan 13, Tim Duesterhus wrote:
> this is a patch series ultimately leading to IPv6 support for the
> ipmask converter. Please note the following:

+1

I did something similar (never 100% finished) 
(http://haproxy.formilux.narkive.com/PZHJ5xNH/rfc-ipv6mask-converter).

Quick question: how does your patch handle ipv4mapped ipv6
address(::ffff:1.2.3.4) ? Does it use v4 or v6 mask for these addresses ?
(From code I think v4 (first tries to convert v6 to v4 with c_ipv62ip) ?)

Do you see any use for ip6mask sample that would always use ipv6 mask
and only work with ipv6 addresses (ipv4mapped and pure ipv6) ?

Patch8 could add comment about arg_p parameters to sample_conv_ipmask
maybe something like:
+/* takes the ipv4 netmask in arg_p[0] and optional ipv6 netmask in
arg_p[1] */

Have you tested that req.hdr_ip / stick tables work w/both masks ? I
used something like:
http-request track-sc0 req.hdr_ip(X,1),ipmask(24,64) table test_be
http-request set-var(sess.myx) req.hdr_ip(X,1),ipmask(24,64)
http-response set-header X-MY %[var(sess.myx)]

backend test_be
  stick-table type ipv6 size 20 expire 180s store gpc0,conn_cnt

-Jarno

> - The first patch contains non-US-ASCII characters, as the sole purpose
>   of it is to remove the non-US-ASCII characters from the source file.
>   Please take extra care when applying the patch to make sure the result
>   is good.
> - The next two patches fix two small bugs in the sample converters and
>   are of general utility.
> - The last five patches implement the progression to IPv6 support for the
>   ipmask converter and only make changes to the mask handling.
> 
> Think of this as 3 logical patch series when reviewing.
> 
> Tim Duesterhus (8):
>   BUG/MINOR: sample: Fix encoding of sample.c
>   DOC: sample: Fix outdated comment about sample casts functions
>   BUG/MINOR: sample: Fix output type of c_ipv62ip
>   DOC: Fix typo in ARGT_MSK6 comment
>   CLEANUP: standard: Use len2mask4 in str2mask
>   MINOR: standard: Add str2mask6 function
>   MINOR: config: Add support for ARGT_MSK6
>   MEDIUM: sample: Add IPv6 support to the ipmask converter
> 
>  doc/configuration.txt     | 11 +++++++----
>  include/common/standard.h |  6 ++++++
>  include/types/arg.h       |  2 +-
>  src/arg.c                 | 11 +++++++++--
>  src/hlua.c                |  7 +++++++
>  src/sample.c              | 31 ++++++++++++++++++++++---------
>  src/standard.c            | 28 ++++++++++++++++++++++++----
>  7 files changed, 76 insertions(+), 20 deletions(-)
> 
> -- 
> 2.15.1
> 
> 

-- 
Jarno Huuskonen

Reply via email to