]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: sample: fix ipmask sample definition
authorAurelien DARRAGON <adarragon@haproxy.com>
Fri, 26 May 2023 15:07:40 +0000 (17:07 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 3 Jul 2023 14:32:01 +0000 (16:32 +0200)
Since 1478aa7 ("MEDIUM: sample: Add IPv6 support to the ipmask converter")
ipmask converter may return IPV6 as well, so the sample definition must
be updated. (the output type is currently explicited to IPV4)

This has no functional impact: one visible effect will be that
converter's visible output type will change from "ipv4" to "addr" when
using 'haproxy -dKcnv'.

src/sample.c

index 48f108de53df81daa172a49f4cb09a111870df5f..83cdb92597501ade274b3df987ef1d486f2e469f 100644 (file)
@@ -4501,7 +4501,7 @@ static struct sample_conv_kw_list sample_conv_kws = {ILH, {
        { "be2hex",  sample_conv_be2hex,       ARG3(1,STR,SINT,SINT), sample_conv_be2hex_check, SMP_T_BIN,  SMP_T_STR  },
        { "hex",     sample_conv_bin2hex,      0,                     NULL,                     SMP_T_BIN,  SMP_T_STR  },
        { "hex2i",   sample_conv_hex2int,      0,                     NULL,                     SMP_T_STR,  SMP_T_SINT },
-       { "ipmask",  sample_conv_ipmask,       ARG2(1,MSK4,MSK6),     NULL,                     SMP_T_ADDR, SMP_T_IPV4 },
+       { "ipmask",  sample_conv_ipmask,       ARG2(1,MSK4,MSK6),     NULL,                     SMP_T_ADDR, SMP_T_ADDR },
        { "ltime",   sample_conv_ltime,        ARG2(1,STR,SINT),      NULL,                     SMP_T_SINT, SMP_T_STR  },
        { "utime",   sample_conv_utime,        ARG2(1,STR,SINT),      NULL,                     SMP_T_SINT, SMP_T_STR  },
        { "crc32",   sample_conv_crc32,        ARG1(0,SINT),          NULL,                     SMP_T_BIN,  SMP_T_SINT },