From 50d2895069f1584a2aab292e24f1494f2c6eea75 Mon Sep 17 00:00:00 2001 From: phk Date: Mon, 18 Sep 2006 10:38:13 +0000 Subject: [PATCH] Add a couple of XXX comments git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1072 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- varnish-cache/bin/varnishd/cache_center.c | 7 +++++++ varnish-cache/bin/varnishd/cache_pool.c | 6 ++++++ 2 files changed, 13 insertions(+) diff --git a/varnish-cache/bin/varnishd/cache_center.c b/varnish-cache/bin/varnishd/cache_center.c index 2b8bd2ed..af9cc631 100644 --- a/varnish-cache/bin/varnishd/cache_center.c +++ b/varnish-cache/bin/varnishd/cache_center.c @@ -303,6 +303,13 @@ cnt_first(struct sess *sp) { int i; + /* + * XXX: If we don't have acceptfilters we are somewhat subject + * XXX: to DoS'ing here. One remedy would be to set a shorter + * XXX: SO_RCVTIMEO and once we have received something here + * XXX: increase it to the normal value. + */ + assert(sp->xid == 0); VCA_Prep(sp); sp->wrk->idle = sp->t_open.tv_sec; diff --git a/varnish-cache/bin/varnishd/cache_pool.c b/varnish-cache/bin/varnishd/cache_pool.c index edbb0443..c529cb4a 100644 --- a/varnish-cache/bin/varnishd/cache_pool.c +++ b/varnish-cache/bin/varnishd/cache_pool.c @@ -275,6 +275,12 @@ WRK_QueueSession(struct sess *sp) UNLOCK(&qp->mtx); LOCK(&tmtx); + /* + * XXX: If there are too many requests in the overflow queue + * XXX: we should kill the request right here. + * XXX: Not sure how though. Simply closing may be the better + * XXX: compromise. + */ TAILQ_INSERT_TAIL(&overflow, &sp->workreq, list); VSL_stats->n_wrk_overflow++; VSL_stats->n_wrk_queue++; -- 2.39.5