From: Thierry FOURNIER Date: Sun, 16 Aug 2015 10:03:39 +0000 (+0200) Subject: BUG/MEDIUM: stream: The stream doen't inherit SC from the session X-Git-Tag: v1.6-dev4~70 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c8fdb983c50039b80053327a945364983715c731;p=thirdparty%2Fhaproxy.git BUG/MEDIUM: stream: The stream doen't inherit SC from the session During the processing of tcp-request connection, the stream doesn't exists, so the stick counters are stored in the session. When the stream is created it must inherit from the session sc. This patch fix this behavior. [WT: this is specific to 1.6, no backport needed] --- diff --git a/src/stream.c b/src/stream.c index e6f1fc64dd..910b3093e6 100644 --- a/src/stream.c +++ b/src/stream.c @@ -107,7 +107,7 @@ struct stream *stream_new(struct session *sess, struct task *t, enum obj_type *o s->current_rule_list = NULL; s->current_rule = NULL; - memset(s->stkctr, 0, sizeof(s->stkctr)); + memcpy(s->stkctr, sess->stkctr, sizeof(s->stkctr)); s->sess = sess; s->si[0].flags = SI_FL_NONE;