Hi,

Here is a small bug fix on SPOE filter.


--
Christopher
>From 7ed3c2942d57ea2ddfc8973cce9cc1c94bca01da Mon Sep 17 00:00:00 2001
From: Christopher Faulet <cfau...@haproxy.com>
Date: Thu, 24 Nov 2016 14:53:22 +0100
Subject: [PATCH] BUG: spoe: Fix parsing of SPOE actions in ACK frames
X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4

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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/flt_spoe.c b/src/flt_spoe.c
index 0b722b6..8227140 100644
--- a/src/flt_spoe.c
+++ b/src/flt_spoe.c
@@ -2017,7 +2017,7 @@ 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 ((idx += decode_spoe_data(p+idx, p+size, &smp)) == -1)
 					goto skip;
 
 				SPOE_PRINTF(stderr, "%d.%06d [SPOE/%-15s] %s: stream=%p"
-- 
2.7.4

Reply via email to