summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorNGINX team <nginx@nginx.org>2012-03-28 14:00:08 +0000
committerJon Kolb <jon@b0g.us>2012-03-28 14:00:08 +0000
commit60a50f7b445d1ac18ea0b1ff140745b6844c6794 (patch)
treeb2edd9e3a38a3e58a0b348b6988e55f7f8be7cd0 /src/core
parent3e2cd7431101761df65f2242c667c037599aa0c4 (diff)
downloadnginx-60a50f7b445d1ac18ea0b1ff140745b6844c6794.tar.gz
Changes with nginx 1.1.18 28 Mar 2012v1.1.18
*) Change: keepalive connections are no longer disabled for Safari by default. *) Feature: the $connection_requests variable. *) Feature: $tcpinfo_rtt, $tcpinfo_rttvar, $tcpinfo_snd_cwnd and $tcpinfo_rcv_space variables. *) Feature: the "worker_cpu_affinity" directive now works on FreeBSD. *) Feature: the "xslt_param" and "xslt_string_param" directives. Thanks to Samuel Behan. *) Bugfix: in configure tests. Thanks to Piotr Sikora. *) Bugfix: in the ngx_http_xslt_filter_module. *) Bugfix: nginx could not be built on Debian GNU/Hurd.
Diffstat (limited to 'src/core')
-rw-r--r--src/core/nginx.c18
-rw-r--r--src/core/nginx.h4
-rw-r--r--src/core/ngx_cycle.h4
-rw-r--r--src/core/ngx_resolver.c6
4 files changed, 18 insertions, 14 deletions
diff --git a/src/core/nginx.c b/src/core/nginx.c
index e8fcbaeba..19feb0700 100644
--- a/src/core/nginx.c
+++ b/src/core/nginx.c
@@ -983,15 +983,15 @@ ngx_core_module_init_conf(ngx_cycle_t *cycle, void *conf)
ngx_conf_init_value(ccf->worker_processes, 1);
ngx_conf_init_value(ccf->debug_points, 0);
-#if (NGX_HAVE_SCHED_SETAFFINITY)
+#if (NGX_HAVE_CPU_AFFINITY)
if (ccf->cpu_affinity_n
&& ccf->cpu_affinity_n != 1
&& ccf->cpu_affinity_n != (ngx_uint_t) ccf->worker_processes)
{
ngx_log_error(NGX_LOG_WARN, cycle->log, 0,
- "number of the \"worker_processes\" is not equal to "
- "the number of the \"worker_cpu_affinity\" mask, "
+ "the number of \"worker_processes\" is not equal to "
+ "the number of \"worker_cpu_affinity\" masks, "
"using last mask for remaining worker processes");
}
@@ -1242,11 +1242,11 @@ ngx_set_priority(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
static char *
ngx_set_cpu_affinity(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
{
-#if (NGX_HAVE_SCHED_SETAFFINITY)
+#if (NGX_HAVE_CPU_AFFINITY)
ngx_core_conf_t *ccf = conf;
u_char ch;
- u_long *mask;
+ uint64_t *mask;
ngx_str_t *value;
ngx_uint_t i, n;
@@ -1254,7 +1254,7 @@ ngx_set_cpu_affinity(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
return "is duplicate";
}
- mask = ngx_palloc(cf->pool, (cf->args->nelts - 1) * sizeof(long));
+ mask = ngx_palloc(cf->pool, (cf->args->nelts - 1) * sizeof(uint64_t));
if (mask == NULL) {
return NGX_CONF_ERROR;
}
@@ -1266,9 +1266,9 @@ ngx_set_cpu_affinity(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
for (n = 1; n < cf->args->nelts; n++) {
- if (value[n].len > 32) {
+ if (value[n].len > 64) {
ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
- "\"worker_cpu_affinity\" supports up to 32 CPU only");
+ "\"worker_cpu_affinity\" supports up to 64 CPUs only");
return NGX_CONF_ERROR;
}
@@ -1311,7 +1311,7 @@ ngx_set_cpu_affinity(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
}
-u_long
+uint64_t
ngx_get_cpu_affinity(ngx_uint_t n)
{
ngx_core_conf_t *ccf;
diff --git a/src/core/nginx.h b/src/core/nginx.h
index cd27398dd..f23bbf4d0 100644
--- a/src/core/nginx.h
+++ b/src/core/nginx.h
@@ -9,8 +9,8 @@
#define _NGINX_H_INCLUDED_
-#define nginx_version 1001017
-#define NGINX_VERSION "1.1.17"
+#define nginx_version 1001018
+#define NGINX_VERSION "1.1.18"
#define NGINX_VER "nginx/" NGINX_VERSION
#define NGINX_VAR "NGINX"
diff --git a/src/core/ngx_cycle.h b/src/core/ngx_cycle.h
index dbc6e195e..551b6288e 100644
--- a/src/core/ngx_cycle.h
+++ b/src/core/ngx_cycle.h
@@ -86,7 +86,7 @@ typedef struct {
int priority;
ngx_uint_t cpu_affinity_n;
- u_long *cpu_affinity;
+ uint64_t *cpu_affinity;
char *username;
ngx_uid_t user;
@@ -124,7 +124,7 @@ ngx_int_t ngx_signal_process(ngx_cycle_t *cycle, char *sig);
void ngx_reopen_files(ngx_cycle_t *cycle, ngx_uid_t user);
char **ngx_set_environment(ngx_cycle_t *cycle, ngx_uint_t *last);
ngx_pid_t ngx_exec_new_binary(ngx_cycle_t *cycle, char *const *argv);
-u_long ngx_get_cpu_affinity(ngx_uint_t n);
+uint64_t ngx_get_cpu_affinity(ngx_uint_t n);
ngx_shm_zone_t *ngx_shared_memory_add(ngx_conf_t *cf, ngx_str_t *name,
size_t size, void *tag);
diff --git a/src/core/ngx_resolver.c b/src/core/ngx_resolver.c
index 2e3047135..02c484da6 100644
--- a/src/core/ngx_resolver.c
+++ b/src/core/ngx_resolver.c
@@ -1840,7 +1840,7 @@ ngx_resolver_create_name_query(ngx_resolver_node_t *rn, ngx_resolver_ctx_t *ctx)
len++;
} else {
- if (len == 0) {
+ if (len == 0 || len > 255) {
return NGX_DECLINED;
}
@@ -1851,6 +1851,10 @@ ngx_resolver_create_name_query(ngx_resolver_node_t *rn, ngx_resolver_ctx_t *ctx)
p--;
}
+ if (len == 0 || len > 255) {
+ return NGX_DECLINED;
+ }
+
*p = (u_char) len;
return NGX_OK;