Jarno, Am 14.01.2018 um 10:01 schrieb Jarno Huuskonen:
> 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) ?) Yes, you are correct. I took take care that these are handled as IPv4. > Do you see any use for ip6mask sample that would always use ipv6 mask > and only work with ipv6 addresses (ipv4mapped and pure ipv6) ? That basically would boil down to completely masking away IPv4 addresses. You can do that using: `ipmask(0,64)` with my patch as well (resulting in 0.0.0.0 for IPv4 addresses). Personally I don't see a real use case for handling IPv6 only. > 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] */ Yes, thank you. I also noticed that the parameter is called `args` if multiple parameters are accepted. I fixed the comment, renamed the parameter and will send the updated patch in a separate mail to the list. > 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 I must admit that I never used stick tables in haproxy before. The use case that lead me to implement this patch is privacy reasons (mask off the lower bits for the logs). I verified my patch using the haproxy.cfg given in the commit message and don't see a reason why it should not work in other places. I'd be grateful if you could verify the correct workings of stick tables, as you already know how they are supposed to work. Thanks Tim Düsterhus

