diff --git a/src/backend.c b/src/backend.c
index 2d7d91d..7250aa9 100644
--- a/src/backend.c
+++ b/src/backend.c
@@ -1741,11 +1741,11 @@
 
 	/* Now handle synchronously connected sockets. We know the stream-int
 	 * is at least in state SI_ST_CON. These ones typically are UNIX
-	 * sockets, socket pairs, and occasionally TCP connections on the
+	 * sockets, socket pairs, andoccasionally TCP connections on the
 	 * loopback on a heavily loaded system.
 	 */
 	if ((srv_conn->flags & CO_FL_ERROR || s->csb->endp->flags & CS_EP_ERROR))
-		cs_si(s->csb)->flags |= SI_FL_ERR;
+		s->csb->flags |= CS_FL_ERR;
 
 	/* If we had early data, and the handshake ended, then
 	 * we can remove the flag, and attempt to wake the task up,
@@ -1964,7 +1964,7 @@
 		 * allocation problem, so we want to retry now.
 		 */
 		cs->si->state = SI_ST_CER;
-		cs->si->flags &= ~SI_FL_ERR;
+		cs->flags &= ~CS_FL_ERR;
 		back_handle_st_cer(s);
 
 		DBG_TRACE_STATE("connection error, retry", STRM_EV_STRM_PROC|STRM_EV_SI_ST|STRM_EV_STRM_ERR, s);
@@ -2187,9 +2187,9 @@
 
  done:
 	/* retryable error ? */
-	if ((s->flags & SF_CONN_EXP) || (cs->si->flags & SI_FL_ERR)) {
+	if ((s->flags & SF_CONN_EXP) || (cs->flags & CS_FL_ERR)) {
 		if (!cs->si->err_type) {
-			if (cs->si->flags & SI_FL_ERR)
+			if (cs->flags & CS_FL_ERR)
 				cs->si->err_type = SI_ET_CONN_ERR;
 			else
 				cs->si->err_type = SI_ET_CONN_TO;
@@ -2234,7 +2234,7 @@
 			_HA_ATOMIC_DEC(&__objt_server(s->target)->cur_sess);
 		}
 
-		if ((cs->si->flags & SI_FL_ERR) &&
+		if ((cs->flags & CS_FL_ERR) &&
 		    conn && conn->err_code == CO_ER_SSL_MISMATCH_SNI) {
 			/* We tried to connect to a server which is configured
 			 * with "verify required" and which doesn't have the
@@ -2291,7 +2291,7 @@
 	 * layers in an unexpected state (i.e < ST_CONN).
 	 *
 	 * Note: the stream-interface will be switched to ST_REQ, ST_ASS or
-	 * ST_TAR and SI_FL_ERR and SF_CONN_EXP flags will be unset.
+	 * ST_TAR and CS_FL_ERR and SF_CONN_EXP flags will be unset.
 	 */
 	if (cs_reset_endp(cs) < 0) {
 		if (!cs->si->err_type)
@@ -2319,7 +2319,7 @@
 
 	stream_choose_redispatch(s);
 
-	if (cs->si->flags & SI_FL_ERR) {
+	if (cs->flags & CS_FL_ERR) {
 		/* The error was an asynchronous connection error, and we will
 		 * likely have to retry connecting to the same server, most
 		 * likely leading to the same result. To avoid this, we wait
@@ -2345,7 +2345,7 @@
 			cs->si->state = SI_ST_TAR;
 			s->conn_exp = tick_add(now_ms, MS_TO_TICKS(delay));
 		}
-		cs->si->flags &= ~SI_FL_ERR;
+		cs->flags &= ~CS_FL_ERR;
 		DBG_TRACE_STATE("retry a new connection", STRM_EV_STRM_PROC|STRM_EV_SI_ST, s);
 	}
 
@@ -2401,7 +2401,7 @@
 		}
 
 		/* retryable error ? */
-		if (cs->si->flags & SI_FL_ERR) {
+		if (cs->flags & CS_FL_ERR) {
 			if (!cs->si->err_type)
 				cs->si->err_type = SI_ET_CONN_ERR;
 			cs->si->state = SI_ST_CER;
diff --git a/src/cli.c b/src/cli.c
index b5330db..35d2d36 100644
--- a/src/cli.c
+++ b/src/cli.c
@@ -1084,7 +1084,7 @@
 					}
 				break;
 			default: /* abnormal state */
-				cs->si->flags |= SI_FL_ERR;
+				cs->flags |= CS_FL_ERR;
 				break;
 			}
 
diff --git a/src/http_ana.c b/src/http_ana.c
index f87db34..927f0b9 100644
--- a/src/http_ana.c
+++ b/src/http_ana.c
@@ -1247,8 +1247,9 @@
 	req->flags &= ~(CF_WRITE_ERROR | CF_WRITE_TIMEOUT | CF_SHUTW | CF_SHUTW_NOW);
 	res->flags &= ~(CF_READ_ERROR | CF_READ_TIMEOUT | CF_SHUTR | CF_EOI | CF_READ_NULL | CF_SHUTR_NOW);
 	res->analysers &= AN_RES_FLT_END;
-	si->flags &= ~(SI_FL_ERR | SI_FL_RXBLK_SHUT);
+	si->flags &= ~SI_FL_RXBLK_SHUT;
 	si->err_type = SI_ET_NONE;
+	si->cs->flags &= ~CS_FL_ERR;
 	s->flags &= ~(SF_CONN_EXP | SF_ERR_MASK | SF_FINST_MASK);
 	s->conn_exp = TICK_ETERNITY;
 	stream_choose_redispatch(s);
diff --git a/src/stream.c b/src/stream.c
index c80f63c..e441b6e 100644
--- a/src/stream.c
+++ b/src/stream.c
@@ -880,7 +880,7 @@
 	s->flags &= ~SF_CONN_EXP;
 
 	/* errors faced after sending data need to be reported */
-	if (si->flags & SI_FL_ERR && req->flags & CF_WROTE_DATA) {
+	if (si->cs->flags & CS_FL_ERR && req->flags & CF_WROTE_DATA) {
 		/* Don't add CF_WRITE_ERROR if we're here because
 		 * early data were rejected by the server, or
 		 * http_wait_for_response() will never be called
@@ -1673,7 +1673,7 @@
 		      (CF_SHUTR|CF_READ_ACTIVITY|CF_READ_TIMEOUT|CF_SHUTW|
 		       CF_WRITE_ACTIVITY|CF_WRITE_TIMEOUT|CF_ANA_TIMEOUT)) &&
 		    !(s->flags & SF_CONN_EXP) &&
-		    !((si_f->flags | si_b->flags) & SI_FL_ERR) &&
+		    !((si_f->cs->flags | si_b->cs->flags) & CS_FL_ERR) &&
 		    ((s->pending_events & TASK_WOKEN_ANY) == TASK_WOKEN_TIMER)) {
 			si_f->flags &= ~SI_FL_DONT_WAKE;
 			si_b->flags &= ~SI_FL_DONT_WAKE;
@@ -1692,10 +1692,10 @@
 	 *       must be be reviewed too.
 	 */
 	if (!stream_alloc_work_buffer(s)) {
-		si_f->flags |= SI_FL_ERR;
+		si_f->cs->flags |= CS_FL_ERR;
 		si_f->err_type = SI_ET_CONN_RES;
 
-		si_b->flags |= SI_FL_ERR;
+		si_b->cs->flags |= CS_FL_ERR;
 		si_b->err_type = SI_ET_CONN_RES;
 
 		if (!(s->flags & SF_ERR_MASK))
@@ -1711,11 +1711,11 @@
 	 * connection setup code must be able to deal with any type of abort.
 	 */
 	srv = objt_server(s->target);
-	if (unlikely(si_f->flags & SI_FL_ERR)) {
+	if (unlikely(si_f->cs->flags & CS_FL_ERR)) {
 		if (si_state_in(si_f->state, SI_SB_EST|SI_SB_DIS)) {
 			si_shutr(si_f);
 			si_shutw(si_f);
-			si_report_error(si_f);
+			cs_report_error(si_f->cs);
 			if (!(req->analysers) && !(res->analysers)) {
 				_HA_ATOMIC_INC(&s->be->be_counters.cli_aborts);
 				_HA_ATOMIC_INC(&sess->fe->fe_counters.cli_aborts);
@@ -1731,11 +1731,11 @@
 		}
 	}
 
-	if (unlikely(si_b->flags & SI_FL_ERR)) {
+	if (unlikely(si_b->cs->flags & CS_FL_ERR)) {
 		if (si_state_in(si_b->state, SI_SB_EST|SI_SB_DIS)) {
 			si_shutr(si_b);
 			si_shutw(si_b);
-			si_report_error(si_b);
+			cs_report_error(si_b->cs);
 			_HA_ATOMIC_INC(&s->be->be_counters.failed_resp);
 			if (srv)
 				_HA_ATOMIC_INC(&srv->counters.failed_resp);
@@ -2255,8 +2255,8 @@
 	/* Benchmarks have shown that it's optimal to do a full resync now */
 	if (si_f->state == SI_ST_DIS ||
 	    si_state_in(si_b->state, SI_SB_RDY|SI_SB_DIS) ||
-	    (si_f->flags & SI_FL_ERR && si_f->state != SI_ST_CLO) ||
-	    (si_b->flags & SI_FL_ERR && si_b->state != SI_ST_CLO))
+	    (si_f->cs->flags & CS_FL_ERR && si_f->state != SI_ST_CLO) ||
+	    (si_b->cs->flags & CS_FL_ERR && si_b->state != SI_ST_CLO))
 		goto resync_stream_interface;
 
 	/* otherwise we want to check if we need to resync the req buffer or not */
@@ -2379,8 +2379,8 @@
 
 	if (si_f->state == SI_ST_DIS ||
 	    si_state_in(si_b->state, SI_SB_RDY|SI_SB_DIS) ||
-	    (si_f->flags & SI_FL_ERR && si_f->state != SI_ST_CLO) ||
-	    (si_b->flags & SI_FL_ERR && si_b->state != SI_ST_CLO))
+	    (si_f->cs->flags & CS_FL_ERR && si_f->state != SI_ST_CLO) ||
+	    (si_b->cs->flags & CS_FL_ERR && si_b->state != SI_ST_CLO))
 		goto resync_stream_interface;
 
 	if ((req->flags & ~rqf_last) & CF_MASK_ANALYSER)
diff --git a/src/stream_interface.c b/src/stream_interface.c
index 001a34d..395fcf8 100644
--- a/src/stream_interface.c
+++ b/src/stream_interface.c
@@ -128,16 +128,6 @@
 	pool_free(pool_head_streaminterface, si);
 }
 
-/* to be called only when in SI_ST_DIS with SI_FL_ERR */
-void si_report_error(struct stream_interface *si)
-{
-	if (!si->err_type)
-		si->err_type = SI_ET_DATA_ERR;
-
-	si_oc(si)->flags |= CF_WRITE_ERROR;
-	si_ic(si)->flags |= CF_READ_ERROR;
-}
-
 /*
  * Returns a message to the client ; the connection is shut down for read,
  * and the request is cleared so that no server connection can be initiated.
@@ -235,7 +225,7 @@
 		 * However, if SI_FL_NOLINGER is explicitly set, we know there is
 		 * no risk so we close both sides immediately.
 		 */
-		if (!(si->flags & (SI_FL_ERR | SI_FL_NOLINGER)) &&
+		if (!(si->cs->flags & CS_FL_ERR) && !(si->flags & SI_FL_NOLINGER) &&
 		    !(ic->flags & (CF_SHUTR|CF_DONT_READ)))
 			return;
 
@@ -531,7 +521,7 @@
 	if (/* changes on the production side */
 	    (ic->flags & (CF_READ_NULL|CF_READ_ERROR)) ||
 	    !si_state_in(si->state, SI_SB_CON|SI_SB_RDY|SI_SB_EST) ||
-	    (si->flags & SI_FL_ERR) ||
+	    (si->cs->flags & CS_FL_ERR) ||
 	    ((ic->flags & CF_READ_PARTIAL) &&
 	     ((ic->flags & CF_EOI) || !ic->to_forward || sio->state != SI_ST_EST)) ||
 
@@ -598,13 +588,13 @@
 	if (!channel_is_empty(oc) && !(si->wait_event.events & SUB_RETRY_SEND))
 		si_cs_send(cs);
 
-	/* First step, report to the stream-int what was detected at the
+	/* First step, report to the conn-stream what was detected at the
 	 * connection layer : errors and connection establishment.
-	 * Only add SI_FL_ERR if we're connected, or we're attempting to
+	 * Only add CS_FL_ERR if we're connected, or we're attempting to
 	 * connect, we may get there because we got woken up, but only run
 	 * after process_stream() noticed there were an error, and decided
 	 * to retry to connect, the connection may still have CO_FL_ERROR,
-	 * and we don't want to add SI_FL_ERR back
+	 * and we don't want to add CS_FL_ERR back
 	 *
 	 * Note: This test is only required because si_cs_process is also the SI
 	 *       wake callback. Otherwise si_cs_recv()/si_cs_send() already take
@@ -613,7 +603,7 @@
 
 	if (si->state >= SI_ST_CON) {
 		if ((cs->endp->flags & CS_EP_ERROR) || si_is_conn_error(si))
-			si->flags |= SI_FL_ERR;
+			si->cs->flags |= CS_FL_ERR;
 	}
 
 	/* If we had early data, and the handshake ended, then
@@ -689,11 +679,11 @@
 		 * but process_stream() ran before, detected there were an
 		 * error and put the si back to SI_ST_TAR. There's still
 		 * CO_FL_ERROR on the connection but we don't want to add
-		 * SI_FL_ERR back, so give up
+		 * CS_FL_ERR back, so give up
 		 */
 		if (si->state < SI_ST_CON)
 			return 0;
-		si->flags |= SI_FL_ERR;
+		si->cs->flags |= CS_FL_ERR;
 		return 1;
 	}
 
@@ -807,7 +797,7 @@
 	}
 
 	if (cs->endp->flags & (CS_EP_ERROR|CS_EP_ERR_PENDING)) {
-		si->flags |= SI_FL_ERR;
+		si->cs->flags |= CS_FL_ERR;
 		return 1;
 	}
 
@@ -1102,7 +1092,7 @@
 		if (si->flags & SI_FL_KILL_CONN)
 			cs->endp->flags |= CS_EP_KILL_CONN;
 
-		if (si->flags & SI_FL_ERR) {
+		if (si->cs->flags & CS_FL_ERR) {
 			/* quick close, the socket is already shut anyway */
 		}
 		else if (si->flags & SI_FL_NOLINGER) {
@@ -1192,7 +1182,7 @@
 	if (cs->endp->flags & (CS_EP_ERROR|CS_EP_ERR_PENDING) || si_is_conn_error(si)) {
 		/* Write error on the file descriptor */
 		if (si->state >= SI_ST_CON)
-			si->flags |= SI_FL_ERR;
+			si->cs->flags |= CS_FL_ERR;
 		goto out_wakeup;
 	}
 
@@ -1569,7 +1559,7 @@
 	}
 
 	if (cs->endp->flags & CS_EP_ERROR) {
-		si->flags |= SI_FL_ERR;
+		si->cs->flags |= CS_FL_ERR;
 		ret = 1;
 	}
 	else if (cs->endp->flags & CS_EP_EOS) {
@@ -1656,7 +1646,7 @@
 	 * broken pipe and it must be reported.
 	 */
 	if (!(si->flags & SI_FL_RX_WAIT_EP) && (ic->flags & CF_SHUTR))
-		si->flags |= SI_FL_ERR;
+		si->cs->flags |= CS_FL_ERR;
 
 	/* automatically mark the applet having data available if it reported
 	 * begin blocked by the channel.
@@ -1752,7 +1742,7 @@
 		 * However, if SI_FL_NOLINGER is explicitly set, we know there is
 		 * no risk so we close both sides immediately.
 		 */
-		if (!(si->flags & (SI_FL_ERR | SI_FL_NOLINGER)) &&
+		if (!(si->cs->flags & CS_FL_ERR) && !(si->flags & SI_FL_NOLINGER) &&
 		    !(ic->flags & (CF_SHUTR|CF_DONT_READ)))
 			return;
 
