]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: stream: The stream doen't inherit SC from the session
authorThierry FOURNIER <tfournier@arpalert.org>
Sun, 16 Aug 2015 10:03:39 +0000 (12:03 +0200)
committerWilly Tarreau <w@1wt.eu>
Sun, 16 Aug 2015 21:55:32 +0000 (23:55 +0200)
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]

src/stream.c

index e6f1fc64dd3048f686ce2f1a8451d0296d555655..910b3093e63576b073007326a705d9bf21460823 100644 (file)
@@ -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;