❦ 30 novembre 2014 13:34 +0100, Vincent Bernat <ber...@debian.org> :
>>> We would like to get your approval before uploading 1.5.9-1 to unstable. >>> Upstream has released a new stable release in the 1.5 branch, containing >>> important bugfixes and a minor new feature. The bugfixes (sorted by >>> severity) are: >> >> New features or minor issues don't seem to comply with the freeze policy. >> >> https://release.debian.org/jessie/freeze_policy.html > > Out of 14 changes, 7 are major or medium, 4 are minors and only one is a > new (tiny) feature. This is clearly a bugfix release. Please, accept it > as is. If we only cherry-picked those bugs (leaving out minor bugs, build fixes and the one tiny new feature) : a75eb51b3172 BUG/MAJOR: sessions: unlink session from list on out of memory 6ad3873aa13b BUG/MEDIUM: pattern: don't load more than once a pattern list. d40ea4c3ac38 BUG/MEDIUM: connection: sanitize PPv2 header length before parsing address information 2419748da52e BUG/MAJOR: frontend: initialize capture pointers earlier 9d678af292c5 BUG/MEDIUM: checks: fix conflicts between agent checks and ssl healthchecks 0198527d38f6 BUG/MEDIUM: ssl: force a full GC in case of memory shortage 6684c5606eb0 BUG/MEDIUM: ssl: fix bad ssl context init can cause segfault in case of OOM. We would get those stats: git diff --stat v1.5.8 include/proto/pattern.h | 3 ++- include/types/checks.h | 3 ++- include/types/server.h | 1 - src/acl.c | 2 +- src/checks.c | 2 +- src/connection.c | 6 +++++ src/frontend.c | 14 ++++++++---- src/pattern.c | 22 ++++++++++++++++-- src/server.c | 2 +- src/session.c | 1 + src/ssl_sock.c | 76 ++++++++++++++++++++++++++++++++++++++++++++++++++++++--------- 11 files changed, 109 insertions(+), 23 deletions(-) The source changes missing to go to 1.5.9 would be: git diff --stat test v1.5.9 src src/cfgparse.c | 2 +- src/peers.c | 4 ++-- src/proto_http.c | 3 +-- src/sample.c | 56 +++++++++++++++++++++++++++++++++++++++++--------------- 4 files changed, 45 insertions(+), 20 deletions(-) The diff for those missing changes is attached. Can we just upload 1.5.9?
diff --git a/src/cfgparse.c b/src/cfgparse.c index 392a692001e4..40d20ab0a1ee 100644 --- a/src/cfgparse.c +++ b/src/cfgparse.c @@ -2003,7 +2003,6 @@ int cfg_parse_listen(const char *file, int linenum, char **args, int kwm) curproxy->no_options = defproxy.no_options; curproxy->no_options2 = defproxy.no_options2; curproxy->bind_proc = defproxy.bind_proc; - curproxy->lbprm.algo = defproxy.lbprm.algo; curproxy->except_net = defproxy.except_net; curproxy->except_mask = defproxy.except_mask; curproxy->except_to = defproxy.except_to; @@ -2037,6 +2036,7 @@ int cfg_parse_listen(const char *file, int linenum, char **args, int kwm) } if (curproxy->cap & PR_CAP_BE) { + curproxy->lbprm.algo = defproxy.lbprm.algo; curproxy->fullconn = defproxy.fullconn; curproxy->conn_retries = defproxy.conn_retries; curproxy->max_ka_queue = defproxy.max_ka_queue; diff --git a/src/peers.c b/src/peers.c index b1022ab43e47..b196d881eddd 100644 --- a/src/peers.c +++ b/src/peers.c @@ -1240,7 +1240,7 @@ static struct session *peer_session_create(struct peer *peer, struct peer_sessio if ((s->req->buf = pool_alloc2(pool2_buffer)) == NULL) goto out_fail_req_buf; /* no memory */ - s->req->buf->size = trash.size; + s->req->buf->size = global.tune.bufsize; channel_init(s->req); s->req->prod = &s->si[0]; s->req->cons = &s->si[1]; @@ -1266,7 +1266,7 @@ static struct session *peer_session_create(struct peer *peer, struct peer_sessio if ((s->rep->buf = pool_alloc2(pool2_buffer)) == NULL) goto out_fail_rep_buf; /* no memory */ - s->rep->buf->size = trash.size; + s->rep->buf->size = global.tune.bufsize; channel_init(s->rep); s->rep->prod = &s->si[1]; s->rep->cons = &s->si[0]; diff --git a/src/proto_http.c b/src/proto_http.c index e442b57f34eb..9dccc6ec07aa 100644 --- a/src/proto_http.c +++ b/src/proto_http.c @@ -4086,8 +4086,7 @@ int http_process_req_common(struct session *s, struct channel *req, int an_bit, select_compression_request_header(s, req->buf); /* enable the minimally required analyzers to handle keep-alive and compression on the HTTP response */ - req->analysers = (req->analysers & AN_REQ_HTTP_BODY) | - AN_REQ_HTTP_XFER_BODY | AN_RES_WAIT_HTTP | AN_RES_HTTP_PROCESS_BE | AN_RES_HTTP_XFER_BODY; + req->analysers = (req->analysers & AN_REQ_HTTP_BODY) | AN_REQ_HTTP_XFER_BODY; goto done; } diff --git a/src/sample.c b/src/sample.c index 8e62640f23e5..b5dbc96fcfab 100644 --- a/src/sample.c +++ b/src/sample.c @@ -497,27 +497,20 @@ static int c_str2ipv6(struct sample *smp) return 1; } -/* The sample is always copied into a new one so that smp->size is always - * valid. The NULL char always enforces the end of string if it is met. +/* + * The NULL char always enforces the end of string if it is met. + * Data is never changed, so we can ignore the CONST case */ static int c_bin2str(struct sample *smp) { - struct chunk *trash = get_trash_chunk(); - unsigned char c; - int ptr = 0; + int i; - while (ptr < smp->data.str.len) { - c = smp->data.str.str[ptr]; - if (!c) + for (i = 0; i < smp->data.str.len; i++) { + if (!smp->data.str.str[i]) { + smp->data.str.len = i; break; - trash->str[ptr] = c; - ptr++; + } } - trash->len = ptr; - trash->str[ptr] = 0; - smp->data.str = *trash; - smp->type = SMP_T_STR; - smp->flags &= ~SMP_F_CONST; return 1; } @@ -1345,6 +1338,26 @@ smp_fetch_date(struct proxy *px, struct session *s, void *l7, unsigned int opt, return 1; } +/* returns the number of processes */ +static int +smp_fetch_nbproc(struct proxy *px, struct session *s, void *l7, unsigned int opt, + const struct arg *args, struct sample *smp, const char *kw) +{ + smp->type = SMP_T_UINT; + smp->data.uint = global.nbproc; + return 1; +} + +/* returns the number of the current process (between 1 and nbproc */ +static int +smp_fetch_proc(struct proxy *px, struct session *s, void *l7, unsigned int opt, + const struct arg *args, struct sample *smp, const char *kw) +{ + smp->type = SMP_T_UINT; + smp->data.uint = relative_pid; + return 1; +} + /* generate a random 32-bit integer for whatever purpose, with an optional * range specified in argument. */ @@ -1363,6 +1376,16 @@ smp_fetch_rand(struct proxy *px, struct session *s, void *l7, unsigned int opt, return 1; } +/* returns true if the current process is stopping */ +static int +smp_fetch_stopping(struct proxy *px, struct session *s, void *l7, unsigned int opt, + const struct arg *args, struct sample *smp, const char *kw) +{ + smp->type = SMP_T_BOOL; + smp->data.uint = stopping; + return 1; +} + /* Note: must not be declared <const> as its list will be overwritten. * Note: fetches that may return multiple types must be declared as the lowest * common denominator, the type that can be casted into all other ones. For @@ -1373,7 +1396,10 @@ static struct sample_fetch_kw_list smp_kws = {ILH, { { "always_true", smp_fetch_true, 0, NULL, SMP_T_BOOL, SMP_USE_INTRN }, { "env", smp_fetch_env, ARG1(1,STR), NULL, SMP_T_STR, SMP_USE_INTRN }, { "date", smp_fetch_date, ARG1(0,SINT), NULL, SMP_T_UINT, SMP_USE_INTRN }, + { "nbproc", smp_fetch_nbproc,0, NULL, SMP_T_UINT, SMP_USE_INTRN }, + { "proc", smp_fetch_proc, 0, NULL, SMP_T_UINT, SMP_USE_INTRN }, { "rand", smp_fetch_rand, ARG1(0,UINT), NULL, SMP_T_UINT, SMP_USE_INTRN }, + { "stopping", smp_fetch_stopping, 0, NULL, SMP_T_BOOL, SMP_USE_INTRN }, { /* END */ }, }};
-- printk("Entering UltraSMPenguin Mode...\n"); 2.2.16 /usr/src/linux/arch/sparc64/kernel/smp.c
signature.asc
Description: PGP signature