]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: http: tarpit timeout is reset
authorThierry FOURNIER <tfournier@exceliance.fr>
Fri, 22 Aug 2014 04:55:26 +0000 (06:55 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 22 Aug 2014 09:58:02 +0000 (11:58 +0200)
Before the commit bbba2a8ecc35daf99317aaff7015c1931779c33b
(1.5-dev24-8), the tarpit section set timeout and return, after this
commit, the tarpit section set the timeout, and go to the "done" label
which reset the timeout.

Thanks Bryan Talbot for the bug report and analysis.

This should be backported in 1.5.

src/proto_http.c

index b792c6ce1a7f3c4cfa540787239bc86ce3753b31..7c6a237da15e6481c9af1381bf64445581c2329a 100644 (file)
@@ -4150,8 +4150,9 @@ int http_process_req_common(struct session *s, struct channel *req, int an_bit,
  done: /* done with this analyser, continue with next ones that the calling
         * points will have set, if any.
         */
-       req->analysers &= ~an_bit;
        req->analyse_exp = TICK_ETERNITY;
+ done_without_exp: /* done with this analyser, but dont reset the analyse_exp. */
+       req->analysers &= ~an_bit;
        return 1;
 
  tarpit:
@@ -4177,7 +4178,7 @@ int http_process_req_common(struct session *s, struct channel *req, int an_bit,
                s->be->be_counters.denied_req++;
        if (s->listener->counters)
                s->listener->counters->denied_req++;
-       goto done;
+       goto done_without_exp;
 
  deny: /* this request was blocked (denied) */
        txn->flags |= TX_CLDENY;