MINOR: stream-int: Remove SI_FL_KILL_CON to rely on conn-stream endpoint only

Instead of setting a stream-interface flag to then set the corresponding
conn-stream endpoint flag, we now only rely the conn-stream endoint. Thus
SI_FL_KILL_CON is replaced by CS_EP_KILL_CONN.

In addition si_must_kill_conn() is replaced by cs_must_kill_conn().
diff --git a/dev/flags/flags.c b/dev/flags/flags.c
index ba4018d..5473903 100644
--- a/dev/flags/flags.c
+++ b/dev/flags/flags.c
@@ -263,7 +263,6 @@
 		return;
 	}
 
-	SHOW_FLAG(f, SI_FL_KILL_CONN);
 	SHOW_FLAG(f, SI_FL_WAIT_DATA);
 	SHOW_FLAG(f, SI_FL_ISBACK);
 	SHOW_FLAG(f, SI_FL_DONT_WAKE);
diff --git a/include/haproxy/cs_utils.h b/include/haproxy/cs_utils.h
index 2346a85..d44ea0c 100644
--- a/include/haproxy/cs_utils.h
+++ b/include/haproxy/cs_utils.h
@@ -187,4 +187,11 @@
 	return 1;
 }
 
+
+/* Marks on the conn-stream that next shutw must kill the whole connection */
+static inline void cs_must_kill_conn(struct conn_stream *cs)
+{
+	cs->endp->flags |= CS_EP_KILL_CONN;
+}
+
 #endif /* _HAPROXY_CS_UTILS_H */
diff --git a/include/haproxy/stream_interface-t.h b/include/haproxy/stream_interface-t.h
index 5fe805e..7766f4c 100644
--- a/include/haproxy/stream_interface-t.h
+++ b/include/haproxy/stream_interface-t.h
@@ -84,7 +84,6 @@
 enum {
 	SI_FL_NONE       = 0x00000000,  /* nothing */
 	/* unused: 0x00000001, 0x00000002 */
-	SI_FL_KILL_CONN  = 0x00000004,  /* next shutw must kill the whole conn, not just the stream */
 	SI_FL_WAIT_DATA  = 0x00000008,  /* stream-int waits for more outgoing data to send */
 	SI_FL_ISBACK     = 0x00000010,  /* 0 for front-side SI, 1 for back-side */
 	SI_FL_DONT_WAKE  = 0x00000020,  /* resync in progress, don't wake up */
diff --git a/include/haproxy/stream_interface.h b/include/haproxy/stream_interface.h
index 4424a7e..18892b2 100644
--- a/include/haproxy/stream_interface.h
+++ b/include/haproxy/stream_interface.h
@@ -327,12 +327,6 @@
 	si->ops->shutw(si);
 }
 
-/* Marks on the stream-interface that next shutw must kill the whole connection */
-static inline void si_must_kill_conn(struct stream_interface *si)
-{
-	si->flags |= SI_FL_KILL_CONN;
-}
-
 /* This is to be used after making some room available in a channel. It will
  * return without doing anything if the stream interface's RX path is blocked.
  * It will automatically mark the stream interface as busy processing the end
diff --git a/src/http_act.c b/src/http_act.c
index 8c53bee..74a894f 100644
--- a/src/http_act.c
+++ b/src/http_act.c
@@ -23,6 +23,8 @@
 #include <haproxy/capture-t.h>
 #include <haproxy/cfgparse.h>
 #include <haproxy/chunk.h>
+#include <haproxy/conn_stream.h>
+#include <haproxy/cs_utils.h>
 #include <haproxy/global.h>
 #include <haproxy/http.h>
 #include <haproxy/http_ana.h>
@@ -718,7 +720,7 @@
 static enum act_return http_action_reject(struct act_rule *rule, struct proxy *px,
                                           struct session *sess, struct stream *s, int flags)
 {
-	si_must_kill_conn(chn_prod(&s->req)->si);
+	cs_must_kill_conn(chn_prod(&s->req));
 	channel_abort(&s->req);
 	channel_abort(&s->res);
 	s->req.analysers &= AN_REQ_FLT_END;
diff --git a/src/stream_interface.c b/src/stream_interface.c
index f9c6839..dcbe1a1 100644
--- a/src/stream_interface.c
+++ b/src/stream_interface.c
@@ -1038,9 +1038,6 @@
 	if (!si_state_in(si->state, SI_SB_CON|SI_SB_RDY|SI_SB_EST))
 		return;
 
-	if (si->flags & SI_FL_KILL_CONN)
-		cs->endp->flags |= CS_EP_KILL_CONN;
-
 	if (si_oc(si)->flags & CF_SHUTW) {
 		cs_close(cs);
 		si->state = SI_ST_DIS;
@@ -1089,8 +1086,6 @@
 		 * 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_KILL_CONN)
-			cs->endp->flags |= CS_EP_KILL_CONN;
 
 		if (cs->endp->flags & CS_EP_ERROR) {
 			/* quick close, the socket is already shut anyway */
@@ -1121,8 +1116,6 @@
 		/* we may have to close a pending connection, and mark the
 		 * response buffer as shutr
 		 */
-		if (si->flags & SI_FL_KILL_CONN)
-			cs->endp->flags |= CS_EP_KILL_CONN;
 		cs_close(cs);
 		/* fall through */
 	case SI_ST_CER:
diff --git a/src/tcp_rules.c b/src/tcp_rules.c
index 37d5bed..6c45f48 100644
--- a/src/tcp_rules.c
+++ b/src/tcp_rules.c
@@ -17,6 +17,8 @@
 #include <haproxy/cfgparse.h>
 #include <haproxy/channel.h>
 #include <haproxy/connection.h>
+#include <haproxy/conn_stream.h>
+#include <haproxy/cs_utils.h>
 #include <haproxy/global.h>
 #include <haproxy/list.h>
 #include <haproxy/log.h>
@@ -253,7 +255,7 @@
 		_HA_ATOMIC_INC(&sess->listener->counters->failed_req);
 
  reject:
-	si_must_kill_conn(chn_prod(req)->si);
+	cs_must_kill_conn(chn_prod(req));
 	channel_abort(req);
 	channel_abort(&s->res);
 
@@ -391,7 +393,7 @@
 			}
 			else if (rule->action == ACT_TCP_CLOSE) {
 				chn_prod(rep)->si->flags |= SI_FL_NOLINGER | SI_FL_NOHALF;
-				si_must_kill_conn(chn_prod(rep)->si);
+				cs_must_kill_conn(chn_prod(rep));
 				si_shutr(chn_prod(rep)->si);
 				si_shutw(chn_prod(rep)->si);
 				s->last_rule_file = rule->conf.file;
@@ -450,7 +452,7 @@
 		_HA_ATOMIC_INC(&__objt_server(s->target)->counters.failed_resp);
 
  reject:
-	si_must_kill_conn(chn_prod(rep)->si);
+	cs_must_kill_conn(chn_prod(rep));
 	channel_abort(rep);
 	channel_abort(&s->req);