BUG/MEDIUM: send_proxy: fix initialisation of send_proxy_ofs
Commit b22e55bc introduced send_proxy_ofs but forgot to initialize it,
which remained unnoticed since it's always at the same place in the
stream interface. On a machine with dirty RAM returned by malloc(),
some responses were holding a PROXY header, which normally is not
possible.
The problem goes away after properly initializing the field upon each
new session_accept().
This fix does not need to be backported except if any code makes use of
a backport of this feature.
diff --git a/src/session.c b/src/session.c
index af3a464..862af58 100644
--- a/src/session.c
+++ b/src/session.c
@@ -171,6 +171,7 @@
s->si[0].err_loc = NULL;
s->si[0].proto = l->proto;
s->si[0].release = NULL;
+ s->si[0].send_proxy_ofs = 0;
clear_target(&s->si[0].target);
s->si[0].exp = TICK_ETERNITY;
s->si[0].flags = SI_FL_NONE;
@@ -195,6 +196,7 @@
s->si[1].err_loc = NULL;
s->si[1].proto = NULL;
s->si[1].release = NULL;
+ s->si[1].send_proxy_ofs = 0;
clear_target(&s->si[1].target);
s->si[1].sock.shutr= stream_int_shutr;
s->si[1].sock.shutw= stream_int_shutw;