MINOR: stream-int: add a new flag to mention that we want the connection to be killed
The new flag SI_FL_KILL_CONN is now set by the rare actions which
deliberately want the whole connection (and not just the stream) to be
killed. This is only used for "tcp-request content reject",
"tcp-response content reject", "tcp-response content close" and
"http-request reject". The purpose is to desambiguate the close from
a regular shutdown. This will be used by the next patches.
diff --git a/src/tcp_rules.c b/src/tcp_rules.c
index 602749c..91f98b0 100644
--- a/src/tcp_rules.c
+++ b/src/tcp_rules.c
@@ -163,6 +163,7 @@
break;
}
else if (rule->action == ACT_ACTION_DENY) {
+ si_must_kill_conn(chn_prod(req));
channel_abort(req);
channel_abort(&s->res);
req->analysers = 0;
@@ -342,6 +343,7 @@
break;
}
else if (rule->action == ACT_ACTION_DENY) {
+ si_must_kill_conn(chn_prod(rep));
channel_abort(rep);
channel_abort(&s->req);
rep->analysers = 0;
@@ -359,6 +361,7 @@
}
else if (rule->action == ACT_TCP_CLOSE) {
chn_prod(rep)->flags |= SI_FL_NOLINGER | SI_FL_NOHALF;
+ si_must_kill_conn(chn_prod(rep));
si_shutr(chn_prod(rep));
si_shutw(chn_prod(rep));
break;