|
@@ -1,49 +0,0 @@
|
1
|
|
-From 1e89acb6be9ba6400fe4defd3b6b2cc94c6667d9 Mon Sep 17 00:00:00 2001
|
2
|
|
-From: Willy Tarreau <w@1wt.eu>
|
3
|
|
-Date: Wed, 26 Nov 2014 13:24:24 +0100
|
4
|
|
-Subject: [PATCH 2/2] BUG/MEDIUM: payload: ensure that a request channel is
|
5
|
|
- available
|
6
|
|
-
|
7
|
|
-Denys Fedoryshchenko reported a segfault when using certain
|
8
|
|
-sample fetch functions in the "tcp-request connection" rulesets
|
9
|
|
-despite the warnings. This is because some tests for the existence
|
10
|
|
-of the channel were missing.
|
11
|
|
-
|
12
|
|
-The fetches which were fixed are :
|
13
|
|
- - req.ssl_hello_type
|
14
|
|
- - rep.ssl_hello_type
|
15
|
|
- - req.ssl_sni
|
16
|
|
-
|
17
|
|
-This fix must be backported to 1.5.
|
18
|
|
-(cherry picked from commit 83f2592bcd2e186beeabcba16be16faaab82bd39)
|
19
|
|
----
|
20
|
|
- src/payload.c | 6 ++++++
|
21
|
|
- 1 file changed, 6 insertions(+)
|
22
|
|
-
|
23
|
|
-diff --git a/src/payload.c b/src/payload.c
|
24
|
|
-index 4057f6f..f62163c 100644
|
25
|
|
---- a/src/payload.c
|
26
|
|
-+++ b/src/payload.c
|
27
|
|
-@@ -72,6 +72,9 @@ smp_fetch_ssl_hello_type(struct proxy *px, struct session *s, void *l7, unsigned
|
28
|
|
-
|
29
|
|
- chn = ((opt & SMP_OPT_DIR) == SMP_OPT_DIR_RES) ? s->rep : s->req;
|
30
|
|
-
|
31
|
|
-+ if (!chn)
|
32
|
|
-+ goto not_ssl_hello;
|
33
|
|
-+
|
34
|
|
- bleft = chn->buf->i;
|
35
|
|
- data = (const unsigned char *)chn->buf->p;
|
36
|
|
-
|
37
|
|
-@@ -276,6 +279,9 @@ smp_fetch_ssl_hello_sni(struct proxy *px, struct session *s, void *l7, unsigned
|
38
|
|
-
|
39
|
|
- chn = ((opt & SMP_OPT_DIR) == SMP_OPT_DIR_RES) ? s->rep : s->req;
|
40
|
|
-
|
41
|
|
-+ if (!chn)
|
42
|
|
-+ goto not_ssl_hello;
|
43
|
|
-+
|
44
|
|
- bleft = chn->buf->i;
|
45
|
|
- data = (unsigned char *)chn->buf->p;
|
46
|
|
-
|
47
|
|
-2.0.4
|
48
|
|
-
|