diff --git a/include/haproxy/sample-t.h b/include/haproxy/sample-t.h index 9969a18d6..b2da0772b 100644 --- a/include/haproxy/sample-t.h +++ b/include/haproxy/sample-t.h @@ -36,7 +36,7 @@ enum { SMP_T_ANY = 0, /* pseudo type: any type */ SMP_T_BOOL, /* boolean */ SMP_T_SINT, /* signed 64bits integer type */ - SMP_T_ADDR, /* ipv4 or ipv6, only used for input type compatibility */ + SMP_T_ADDR, /* pseudo type: could be ipv4 or ipv6 */ SMP_T_IPV4, /* ipv4 type */ SMP_T_IPV6, /* ipv6 type */ SMP_T_STR, /* char string type */ diff --git a/src/sample.c b/src/sample.c index a8eb50713..48f108de5 100644 --- a/src/sample.c +++ b/src/sample.c @@ -997,7 +997,7 @@ sample_cast_fct sample_casts[SMP_TYPES][SMP_TYPES] = { /* from: ANY */ { c_none, c_pseudo, c_pseudo, c_pseudo, c_pseudo, c_pseudo, c_pseudo, c_pseudo, c_pseudo, }, /* BOOL */ { c_none, c_none, c_none, NULL, NULL, NULL, c_int2str, c_bool2bin, NULL, }, /* SINT */ { c_none, c_none, c_none, c_int2ip, c_int2ip, c_int2ipv6, c_int2str, c_int2bin, NULL, }, -/* ADDR */ { c_none, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, }, +/* ADDR */ { c_none, NULL, NULL, c_pseudo, c_pseudo, c_pseudo, c_pseudo, c_pseudo, NULL, }, /* IPV4 */ { c_none, NULL, c_ip2int, c_none, c_none, c_ip2ipv6, c_ip2str, c_addr2bin, NULL, }, /* IPV6 */ { c_none, NULL, NULL, c_none, c_ipv62ip,c_none, c_ipv62str, c_addr2bin, NULL, }, /* STR */ { c_none, c_str2int, c_str2int, c_str2addr, c_str2ip, c_str2ipv6, c_none, c_none, c_str2meth, },