BUG: spoe: Fix parsing of SPOE actions in ACK frames

For "SET-VAR" actions, data was not correctly parsed. 'idx' variable was not
correctly updated when the 3rd argument was parsed.
This commit is contained in:
Christopher Faulet 2016-11-24 14:53:22 +01:00 committed by Willy Tarreau
parent 97108e08ce
commit b5cff60ef5

View 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",