]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MAJOR: sample: regression on sample cast to stick table types.
authorEmeric Brun <ebrun@haproxy.com>
Tue, 16 Jun 2015 16:26:17 +0000 (18:26 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 16 Jun 2015 16:34:50 +0000 (18:34 +0200)
This regression was introduce by commit
9c627e84b2 (MEDIUM: sample: Add type any)

New sample type 'any' was not handled in the matrix used to cast
to stick-tables types.

src/stick_table.c

index 7c1e857a8b1dfa7c5e782eeac03d8239377852a1..2792960bde2800a5f60768a84a4e5d0680d8efcb 100644 (file)
@@ -609,7 +609,8 @@ static void *k_str2int(struct sample *smp, union stktable_key_data *kdata, size_
 typedef void *(*sample_to_key_fct)(struct sample *smp, union stktable_key_data *kdata, size_t *len);
 static sample_to_key_fct sample_to_key[SMP_TYPES][STKTABLE_TYPES] = {
 /*       table type:   IP          IPV6         INTEGER    STRING      BINARY    */
-/* patt. type: BOOL */ { NULL,     NULL,        k_int2int, k_int2str,  NULL      },
+/* patt. type: ANY  */ { k_ip2ip,  k_ip2ipv6,   k_int2int, k_str2str,  k_str2str },
+/*             BOOL */ { NULL,     NULL,        k_int2int, k_int2str,  NULL      },
 /*             UINT */ { k_int2ip, NULL,        k_int2int, k_int2str,  NULL      },
 /*             SINT */ { k_int2ip, NULL,        k_int2int, k_int2str,  NULL      },
 /*             ADDR */ { k_ip2ip,  k_ip2ipv6,   k_ip2int,  k_ip2str,   NULL      },