Hi
I think there forgot check if the spoe_context already has fragment msg
send before spoe_queue_context, it will segment fault
in spoe_release_appctx.

Best regards.
From 437775b6f4a611324348746e1e673cb9d024c1b0 Mon Sep 17 00:00:00 2001
From: Kevin Zhu <ipand...@gmail.com>
Date: Sat, 20 Apr 2019 17:45:21 +0800
Subject: [PATCH] BUG/MAJOR: spoe: spoe_context shouldn't queue again if
 fragment send

If spoe_context already has fragment msg send, queue it to sending_queue
again the other appctx will sent the msg, it will segment fault in function
spoe_release_appctx.

This patch should be backported to 1.9
---
 src/flt_spoe.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/flt_spoe.c b/src/flt_spoe.c
index 0f72de8..3420540 100644
--- a/src/flt_spoe.c
+++ b/src/flt_spoe.c
@@ -2682,8 +2682,9 @@ spoe_process_messages(struct stream *s, struct spoe_context *ctx,
 			goto end;
 		if (!ret)
 			goto skip;
-		if (spoe_queue_context(ctx) < 0)
-			goto end;
+		if (ctx->spoe_appctx == NULL)
+			if (spoe_queue_context(ctx) < 0)
+				goto end;
 		ctx->state = SPOE_CTX_ST_SENDING_MSGS;
 	}
 
-- 
2.7.4

Reply via email to