From: Tim Duesterhus Date: Thu, 25 Jan 2018 15:24:46 +0000 (+0100) Subject: BUG/MINOR: sample: Fix output type of c_ipv62ip X-Git-Tag: v1.9-dev1~489 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bf5ce02effdc2d471fdb421010757320136cbb45;p=thirdparty%2Fhaproxy.git BUG/MINOR: sample: Fix output type of c_ipv62ip c_ipv62ip failed to set the output type of the cast to SMP_T_IPV4 even for a successful conversion. This bug exists as of commit cc4d1716a2e72516c2505a6459a9ddbbfb186da2 which is the first commit adding this function. v1.6-dev4 is the first tag containing this commit, the fix should be backported to haproxy 1.6 and newer. --- diff --git a/src/sample.c b/src/sample.c index 7ac2ec37b6..8de076b5cc 100644 --- a/src/sample.c +++ b/src/sample.c @@ -531,7 +531,7 @@ static int c_ipv62ip(struct sample *smp) { if (!v6tov4(&smp->data.u.ipv4, &smp->data.u.ipv6)) return 0; - smp->data.type = SMP_T_IPV6; + smp->data.type = SMP_T_IPV4; return 1; }