Skip to content

Commit

Permalink
nginx 1.25.5
Browse files Browse the repository at this point in the history
  • Loading branch information
chronolaw committed Apr 19, 2024
1 parent 7cf9d96 commit 0e50dca
Show file tree
Hide file tree
Showing 38 changed files with 2,298 additions and 532 deletions.
22 changes: 22 additions & 0 deletions nginx/CHANGES
Original file line number Diff line number Diff line change
@@ -1,4 +1,26 @@

Changes with nginx 1.25.5 16 Apr 2024

*) Feature: virtual servers in the stream module.

*) Feature: the ngx_stream_pass_module.

*) Feature: the "deferred", "accept_filter", and "setfib" parameters of
the "listen" directive in the stream module.

*) Feature: cache line size detection for some architectures.
Thanks to Piotr Sikora.

*) Feature: support for Homebrew on Apple Silicon.
Thanks to Piotr Sikora.

*) Bugfix: Windows cross-compilation bugfixes and improvements.
Thanks to Piotr Sikora.

*) Bugfix: unexpected connection closure while using 0-RTT in QUIC.
Thanks to Vladimir Khomutov.


Changes with nginx 1.25.4 14 Feb 2024

*) Security: when using HTTP/3 a segmentation fault might occur in a
Expand Down
24 changes: 24 additions & 0 deletions nginx/CHANGES.ru
Original file line number Diff line number Diff line change
@@ -1,4 +1,28 @@

Изменения в nginx 1.25.5 16.04.2024

*) Добавление: виртуальные сервера в модуле stream.

*) Добавление: модуль ngx_stream_pass_module.

*) Добавление: параметры deferred, accept_filter и setfib директивы
listen в модуле stream.

*) Добавление: определение размера строки кеша процессора для некоторых
архитектур.
Спасибо Piotr Sikora.

*) Добавление: поддержка Homebrew на Apple Silicon.
Спасибо Piotr Sikora.

*) Исправление: улучшения и исправления кросс-компиляции для Windows.
Спасибо Piotr Sikora.

*) Исправление: неожиданное закрытие соединения при использовании 0-RTT
в QUIC.
Спасибо Владимиру Хомутову.


Изменения в nginx 1.25.4 14.02.2024

*) Безопасность: при использовании HTTP/3 в рабочем процессе мог
Expand Down
2 changes: 1 addition & 1 deletion nginx/auto/install
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ install: build $NGX_INSTALL_PERL_MODULES
test ! -f '\$(DESTDIR)$NGX_SBIN_PATH' \\
|| mv '\$(DESTDIR)$NGX_SBIN_PATH' \\
'\$(DESTDIR)$NGX_SBIN_PATH.old'
cp $NGX_OBJS/nginx '\$(DESTDIR)$NGX_SBIN_PATH'
cp $NGX_OBJS/nginx$ngx_binext '\$(DESTDIR)$NGX_SBIN_PATH'

test -d '\$(DESTDIR)$NGX_CONF_PREFIX' \\
|| mkdir -p '\$(DESTDIR)$NGX_CONF_PREFIX'
Expand Down
17 changes: 17 additions & 0 deletions nginx/auto/lib/geoip/conf
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,23 @@ if [ $ngx_found = no ]; then
fi


if [ $ngx_found = no ]; then

# Homebrew on Apple Silicon

ngx_feature="GeoIP library in /opt/homebrew/"
ngx_feature_path="/opt/homebrew/include"

if [ $NGX_RPATH = YES ]; then
ngx_feature_libs="-R/opt/homebrew/lib -L/opt/homebrew/lib -lGeoIP"
else
ngx_feature_libs="-L/opt/homebrew/lib -lGeoIP"
fi

. auto/feature
fi


if [ $ngx_found = yes ]; then

CORE_INCS="$CORE_INCS $ngx_feature_path"
Expand Down
16 changes: 16 additions & 0 deletions nginx/auto/lib/google-perftools/conf
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,22 @@ if [ $ngx_found = no ]; then
fi


if [ $ngx_found = no ]; then

# Homebrew on Apple Silicon

ngx_feature="Google perftools in /opt/homebrew/"

if [ $NGX_RPATH = YES ]; then
ngx_feature_libs="-R/opt/homebrew/lib -L/opt/homebrew/lib -lprofiler"
else
ngx_feature_libs="-L/opt/homebrew/lib -lprofiler"
fi

. auto/feature
fi


if [ $ngx_found = yes ]; then
CORE_LIBS="$CORE_LIBS $ngx_feature_libs"

Expand Down
17 changes: 17 additions & 0 deletions nginx/auto/lib/libgd/conf
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,23 @@ if [ $ngx_found = no ]; then
fi


if [ $ngx_found = no ]; then

# Homebrew on Apple Silicon

ngx_feature="GD library in /opt/homebrew/"
ngx_feature_path="/opt/homebrew/include"

if [ $NGX_RPATH = YES ]; then
ngx_feature_libs="-R/opt/homebrew/lib -L/opt/homebrew/lib -lgd"
else
ngx_feature_libs="-L/opt/homebrew/lib -lgd"
fi

. auto/feature
fi


if [ $ngx_found = yes ]; then

CORE_INCS="$CORE_INCS $ngx_feature_path"
Expand Down
18 changes: 18 additions & 0 deletions nginx/auto/lib/openssl/conf
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,24 @@ else
. auto/feature
fi

if [ $ngx_found = no ]; then

# Homebrew on Apple Silicon

ngx_feature="OpenSSL library in /opt/homebrew/"
ngx_feature_path="/opt/homebrew/include"

if [ $NGX_RPATH = YES ]; then
ngx_feature_libs="-R/opt/homebrew/lib -L/opt/homebrew/lib -lssl -lcrypto"
else
ngx_feature_libs="-L/opt/homebrew/lib -lssl -lcrypto"
fi

ngx_feature_libs="$ngx_feature_libs $NGX_LIBDL $NGX_LIBPTHREAD"

. auto/feature
fi

if [ $ngx_found = yes ]; then
have=NGX_SSL . auto/have
CORE_INCS="$CORE_INCS $ngx_feature_path"
Expand Down
16 changes: 16 additions & 0 deletions nginx/auto/lib/pcre/conf
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,22 @@ else
. auto/feature
fi

if [ $ngx_found = no ]; then

# Homebrew on Apple Silicon

ngx_feature="PCRE library in /opt/homebrew/"
ngx_feature_path="/opt/homebrew/include"

if [ $NGX_RPATH = YES ]; then
ngx_feature_libs="-R/opt/homebrew/lib -L/opt/homebrew/lib -lpcre"
else
ngx_feature_libs="-L/opt/homebrew/lib -lpcre"
fi

. auto/feature
fi

if [ $ngx_found = yes ]; then
CORE_INCS="$CORE_INCS $ngx_feature_path"
CORE_LIBS="$CORE_LIBS $ngx_feature_libs"
Expand Down
10 changes: 10 additions & 0 deletions nginx/auto/modules
Original file line number Diff line number Diff line change
Expand Up @@ -1166,6 +1166,16 @@ if [ $STREAM != NO ]; then
. auto/module
fi

if [ $STREAM_PASS = YES ]; then
ngx_module_name=ngx_stream_pass_module
ngx_module_deps=
ngx_module_srcs=src/stream/ngx_stream_pass_module.c
ngx_module_libs=
ngx_module_link=$STREAM_PASS

. auto/module
fi

if [ $STREAM_SET = YES ]; then
ngx_module_name=ngx_stream_set_module
ngx_module_deps=
Expand Down
3 changes: 3 additions & 0 deletions nginx/auto/options
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ STREAM_GEOIP=NO
STREAM_MAP=YES
STREAM_SPLIT_CLIENTS=YES
STREAM_RETURN=YES
STREAM_PASS=YES
STREAM_SET=YES
STREAM_UPSTREAM_HASH=YES
STREAM_UPSTREAM_LEAST_CONN=YES
Expand Down Expand Up @@ -337,6 +338,7 @@ use the \"--with-mail_ssl_module\" option instead"
--without-stream_split_clients_module)
STREAM_SPLIT_CLIENTS=NO ;;
--without-stream_return_module) STREAM_RETURN=NO ;;
--without-stream_pass_module) STREAM_PASS=NO ;;
--without-stream_set_module) STREAM_SET=NO ;;
--without-stream_upstream_hash_module)
STREAM_UPSTREAM_HASH=NO ;;
Expand Down Expand Up @@ -556,6 +558,7 @@ cat << END
--without-stream_split_clients_module
disable ngx_stream_split_clients_module
--without-stream_return_module disable ngx_stream_return_module
--without-stream_pass_module disable ngx_stream_pass_module
--without-stream_set_module disable ngx_stream_set_module
--without-stream_upstream_hash_module
disable ngx_stream_upstream_hash_module
Expand Down
15 changes: 15 additions & 0 deletions nginx/auto/os/conf
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,21 @@ case "$NGX_MACHINE" in
NGX_MACH_CACHE_LINE=64
;;

ppc64* | powerpc64*)
have=NGX_ALIGNMENT value=16 . auto/define
NGX_MACH_CACHE_LINE=128
;;

riscv64)
have=NGX_ALIGNMENT value=16 . auto/define
NGX_MACH_CACHE_LINE=64
;;

s390x)
have=NGX_ALIGNMENT value=16 . auto/define
NGX_MACH_CACHE_LINE=256
;;

*)
have=NGX_ALIGNMENT value=16 . auto/define
NGX_MACH_CACHE_LINE=32
Expand Down
4 changes: 4 additions & 0 deletions nginx/auto/os/linux
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,10 @@ ngx_feature_test="struct crypt_data cd;
crypt_r(\"key\", \"salt\", &cd);"
. auto/feature

if [ $ngx_found = yes ]; then
CRYPT_LIB="-lcrypt"
fi


ngx_include="sys/vfs.h"; . auto/include

Expand Down
2 changes: 1 addition & 1 deletion nginx/auto/os/win32
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ ngx_binext=".exe"

case "$NGX_CC_NAME" in

gcc)
clang | gcc)
CORE_LIBS="$CORE_LIBS -ladvapi32 -lws2_32"
MAIN_LINK="$MAIN_LINK -Wl,--export-all-symbols"
MAIN_LINK="$MAIN_LINK -Wl,--out-implib=$NGX_OBJS/libnginx.a"
Expand Down
4 changes: 2 additions & 2 deletions nginx/src/core/nginx.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
#define _NGINX_H_INCLUDED_


#define nginx_version 1025004
#define NGINX_VERSION "1.25.4"
#define nginx_version 1025005
#define NGINX_VERSION "1.25.5"
#define NGINX_VER "nginx/" NGINX_VERSION

#ifdef NGX_BUILD
Expand Down
2 changes: 1 addition & 1 deletion nginx/src/core/ngx_inet.c
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ ngx_cidr_match(struct sockaddr *sa, ngx_array_t *cidrs)

p = inaddr6->s6_addr;

inaddr = p[12] << 24;
inaddr = (in_addr_t) p[12] << 24;
inaddr += p[13] << 16;
inaddr += p[14] << 8;
inaddr += p[15];
Expand Down
5 changes: 4 additions & 1 deletion nginx/src/event/quic/ngx_event_quic.c
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,10 @@ ngx_quic_run(ngx_connection_t *c, ngx_quic_conf_t *conf)
qc = ngx_quic_get_connection(c);

ngx_add_timer(c->read, qc->tp.max_idle_timeout);
ngx_add_timer(&qc->close, qc->conf->handshake_timeout);

if (!qc->streams.initialized) {
ngx_add_timer(&qc->close, qc->conf->handshake_timeout);
}

ngx_quic_connstate_dbg(c);

Expand Down
2 changes: 1 addition & 1 deletion nginx/src/http/modules/ngx_http_access_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ ngx_http_access_handler(ngx_http_request_t *r)
p = sin6->sin6_addr.s6_addr;

if (alcf->rules && IN6_IS_ADDR_V4MAPPED(&sin6->sin6_addr)) {
addr = p[12] << 24;
addr = (in_addr_t) p[12] << 24;
addr += p[13] << 16;
addr += p[14] << 8;
addr += p[15];
Expand Down
8 changes: 3 additions & 5 deletions nginx/src/http/modules/ngx_http_geo_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ ngx_http_geo_cidr_variable(ngx_http_request_t *r, ngx_http_variable_value_t *v,
p = inaddr6->s6_addr;

if (IN6_IS_ADDR_V4MAPPED(inaddr6)) {
inaddr = p[12] << 24;
inaddr = (in_addr_t) p[12] << 24;
inaddr += p[13] << 16;
inaddr += p[14] << 8;
inaddr += p[15];
Expand Down Expand Up @@ -272,7 +272,7 @@ ngx_http_geo_range_variable(ngx_http_request_t *r, ngx_http_variable_value_t *v,
if (IN6_IS_ADDR_V4MAPPED(inaddr6)) {
p = inaddr6->s6_addr;

inaddr = p[12] << 24;
inaddr = (in_addr_t) p[12] << 24;
inaddr += p[13] << 16;
inaddr += p[14] << 8;
inaddr += p[15];
Expand Down Expand Up @@ -1259,7 +1259,7 @@ ngx_http_geo_value(ngx_conf_t *cf, ngx_http_geo_conf_ctx_t *ctx,
return gvvn->value;
}

val = ngx_palloc(ctx->pool, sizeof(ngx_http_variable_value_t));
val = ngx_pcalloc(ctx->pool, sizeof(ngx_http_variable_value_t));
if (val == NULL) {
return NULL;
}
Expand All @@ -1271,8 +1271,6 @@ ngx_http_geo_value(ngx_conf_t *cf, ngx_http_geo_conf_ctx_t *ctx,
}

val->valid = 1;
val->no_cacheable = 0;
val->not_found = 0;

gvvn = ngx_palloc(ctx->temp_pool,
sizeof(ngx_http_geo_variable_value_node_t));
Expand Down
2 changes: 1 addition & 1 deletion nginx/src/http/modules/ngx_http_geoip_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ ngx_http_geoip_addr(ngx_http_request_t *r, ngx_http_geoip_conf_t *gcf)
if (IN6_IS_ADDR_V4MAPPED(inaddr6)) {
p = inaddr6->s6_addr;

inaddr = p[12] << 24;
inaddr = (in_addr_t) p[12] << 24;
inaddr += p[13] << 16;
inaddr += p[14] << 8;
inaddr += p[15];
Expand Down
2 changes: 1 addition & 1 deletion nginx/src/http/modules/ngx_http_referer_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,7 @@ ngx_http_add_regex_referer(ngx_conf_t *cf, ngx_http_referer_conf_t *rlcf,
#else

ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
"the using of the regex \"%V\" requires PCRE library",
"using regex \"%V\" requires PCRE library",
name);

return NGX_ERROR;
Expand Down
1 change: 1 addition & 0 deletions nginx/src/http/modules/ngx_http_rewrite_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,7 @@ ngx_http_rewrite_return(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
}

if (cf->args->nelts == 2) {
ngx_str_set(&ret->text.value, "");
return NGX_CONF_OK;
}

Expand Down
2 changes: 1 addition & 1 deletion nginx/src/http/modules/ngx_http_ssi_filter_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -2001,7 +2001,7 @@ ngx_http_ssi_regex_match(ngx_http_request_t *r, ngx_str_t *pattern,
#else

ngx_log_error(NGX_LOG_ALERT, r->connection->log, 0,
"the using of the regex \"%V\" in SSI requires PCRE library",
"using regex \"%V\" in SSI requires PCRE library",
pattern);
return NGX_HTTP_SSI_ERROR;

Expand Down
4 changes: 2 additions & 2 deletions nginx/src/mail/ngx_mail_core_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ ngx_mail_core_listen(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
continue;
#else
ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
"bind ipv6only is not supported "
"ipv6only is not supported "
"on this platform");
return NGX_CONF_ERROR;
#endif
Expand Down Expand Up @@ -564,7 +564,7 @@ ngx_mail_core_listen(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
}

ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
"the invalid \"%V\" parameter", &value[i]);
"invalid parameter \"%V\"", &value[i]);
return NGX_CONF_ERROR;
}

Expand Down
Loading

0 comments on commit 0e50dca

Please sign in to comment.