]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG: spoe: Fix parsing of SPOE actions in ACK frames
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 24 Nov 2016 13:53:22 +0000 (14:53 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 25 Nov 2016 07:09:10 +0000 (08:09 +0100)
For "SET-VAR" actions, data was not correctly parsed. 'idx' variable was not
correctly updated when the 3rd argument was parsed.

src/flt_spoe.c

index 0b722b6754634783355f7e31bc2462add12310b8..776848e487be86afd2148de0df27b59239a90f08 100644 (file)
@@ -2017,8 +2017,10 @@ process_spoe_actions(struct stream *s, struct spoe_context *ctx,
                                        goto skip;
                                memset(&smp, 0, sizeof(smp));
                                smp_set_owner(&smp, s->be, s->sess, s, dir|SMP_OPT_FINAL);
-                               if (decode_spoe_data(p+idx, p+size, &smp) == -1)
+
+                               if ((i = decode_spoe_data(p+idx, p+size, &smp)) == -1)
                                        goto skip;
+                               idx += i;
 
                                SPOE_PRINTF(stderr, "%d.%06d [SPOE/%-15s] %s: stream=%p"
                                            " - set-var '%s.%s.%.*s'\n",