diff options
| author | Maxim Dounin <mdounin@mdounin.ru> | 2013-02-11 14:58:25 +0000 |
|---|---|---|
| committer | Maxim Dounin <mdounin@mdounin.ru> | 2013-02-11 14:58:25 +0000 |
| commit | 635dae7cadfdc67f439f7c7cb79a1c7f51285f4e (patch) | |
| tree | 21ec60b8f7c149b2c8584d54c19cd30ff8632607 /src/http/modules/ngx_http_upstream_keepalive_module.c | |
| parent | ff145c057451bfe40b5d59c5873091df07964831 (diff) | |
| download | nginx-635dae7cadfdc67f439f7c7cb79a1c7f51285f4e.tar.gz nginx-635dae7cadfdc67f439f7c7cb79a1c7f51285f4e.tar.bz2 | |
Merge of r4999, r5003: detect duplicate "events" and "keepalive".
*) Upstream keepalive: detect duplicate "keepalive" directive. A
failure to detect duplicate "keepalive" directive resulted in
stack exhaustion.
*) Events: added check for duplicate "events" directive.
Diffstat (limited to 'src/http/modules/ngx_http_upstream_keepalive_module.c')
| -rw-r--r-- | src/http/modules/ngx_http_upstream_keepalive_module.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/http/modules/ngx_http_upstream_keepalive_module.c b/src/http/modules/ngx_http_upstream_keepalive_module.c index d10e3d016..a2ad5aa8d 100644 --- a/src/http/modules/ngx_http_upstream_keepalive_module.c +++ b/src/http/modules/ngx_http_upstream_keepalive_module.c @@ -502,6 +502,10 @@ ngx_http_upstream_keepalive(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) kcf = ngx_http_conf_upstream_srv_conf(uscf, ngx_http_upstream_keepalive_module); + if (kcf->original_init_upstream) { + return "is duplicate"; + } + kcf->original_init_upstream = uscf->peer.init_upstream ? uscf->peer.init_upstream : ngx_http_upstream_init_round_robin; |
