Skip to content

Commit

Permalink
Merged with the default branch.
Browse files Browse the repository at this point in the history
  • Loading branch information
pluknet committed Feb 14, 2022
2 parents 45a8ca0 + 828fb94 commit a767450
Show file tree
Hide file tree
Showing 13 changed files with 33 additions and 11 deletions.
6 changes: 3 additions & 3 deletions auto/os/linux
Original file line number Diff line number Diff line change
Expand Up @@ -232,9 +232,6 @@ ngx_feature_test="struct crypt_data cd;
ngx_include="sys/vfs.h"; . auto/include


CC_AUX_FLAGS="$cc_aux_flags -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64"


# BPF sockhash

ngx_feature="BPF sockhash"
Expand Down Expand Up @@ -293,3 +290,6 @@ ngx_feature_test="socklen_t optlen = sizeof(int);
int val;
getsockopt(0, SOL_UDP, UDP_SEGMENT, &val, &optlen)"
. auto/feature


CC_AUX_FLAGS="$cc_aux_flags -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64"
2 changes: 1 addition & 1 deletion docs/text/LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2002-2021 Igor Sysoev
* Copyright (C) 2011-2021 Nginx, Inc.
* Copyright (C) 2011-2022 Nginx, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down
4 changes: 2 additions & 2 deletions 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 1021006
#define NGINX_VERSION "1.21.6"
#define nginx_version 1021007
#define NGINX_VERSION "1.21.7"
#define NGINX_VER "nginx/" NGINX_VERSION

#ifdef NGX_BUILD
Expand Down
1 change: 1 addition & 0 deletions src/core/ngx_connection.h
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ struct ngx_connection_s {
unsigned tcp_nopush:2; /* ngx_connection_tcp_nopush_e */

unsigned need_last_buf:1;
unsigned need_flush_buf:1;

#if (NGX_HAVE_SENDFILE_NODISKIO || NGX_COMPAT)
unsigned busy_count:2;
Expand Down
2 changes: 2 additions & 0 deletions src/event/ngx_event_connect.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,8 @@ ngx_event_connect_peer(ngx_peer_connection_t *pc)
c->recv = ngx_udp_recv;
c->send = ngx_send;
c->send_chain = ngx_udp_send_chain;

c->need_flush_buf = 1;
}

c->log_error = pc->log_error;
Expand Down
6 changes: 6 additions & 0 deletions src/event/ngx_event_openssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -3392,6 +3392,12 @@ ngx_ssl_connection_error(ngx_connection_t *c, int sslerr, ngx_err_t err,
#endif
|| n == SSL_R_WRONG_VERSION_NUMBER /* 267 */
|| n == SSL_R_DECRYPTION_FAILED_OR_BAD_RECORD_MAC /* 281 */
#ifdef SSL_R_APPLICATION_DATA_AFTER_CLOSE_NOTIFY
|| n == SSL_R_APPLICATION_DATA_AFTER_CLOSE_NOTIFY /* 291 */
#endif
#ifdef SSL_R_APPLICATION_DATA_ON_SHUTDOWN
|| n == SSL_R_APPLICATION_DATA_ON_SHUTDOWN /* 291 */
#endif
#ifdef SSL_R_RENEGOTIATE_EXT_TOO_LONG
|| n == SSL_R_RENEGOTIATE_EXT_TOO_LONG /* 335 */
|| n == SSL_R_RENEGOTIATION_ENCODING_ERR /* 336 */
Expand Down
2 changes: 2 additions & 0 deletions src/event/ngx_event_udp.c
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,8 @@ ngx_event_recvmsg(ngx_event_t *ev)
c->send = ngx_udp_send;
c->send_chain = ngx_udp_send_chain;

c->need_flush_buf = 1;

c->log = log;
c->pool->log = log;
c->listening = ls;
Expand Down
2 changes: 1 addition & 1 deletion src/event/ngx_event_udp.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
|| NGX_HAVE_IP_PKTINFO \
|| (NGX_HAVE_INET6 && NGX_HAVE_IPV6_RECVPKTINFO)))
#define NGX_HAVE_ADDRINFO_CMSG 1

#endif


Expand Down Expand Up @@ -60,7 +61,6 @@ ngx_int_t ngx_get_srcaddr_cmsg(struct cmsghdr *cmsg,

#endif


void ngx_event_recvmsg(ngx_event_t *ev);
ssize_t ngx_sendmsg(ngx_connection_t *c, struct msghdr *msg, int flags);
void ngx_udp_rbtree_insert_value(ngx_rbtree_node_t *temp,
Expand Down
5 changes: 5 additions & 0 deletions src/http/ngx_http_file_cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -1756,6 +1756,11 @@ ngx_http_file_cache_forced_expire(ngx_http_file_cache_t *cache)
break;
}

if (fcn->deleting) {
wait = 1;
break;
}

p = ngx_hex_dump(key, (u_char *) &fcn->node.key,
sizeof(ngx_rbtree_key_t));
len = NGX_HTTP_CACHE_KEY_LEN - sizeof(ngx_rbtree_key_t);
Expand Down
3 changes: 2 additions & 1 deletion src/http/ngx_http_write_filter_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,8 @@ ngx_http_write_filter(ngx_http_request_t *r, ngx_chain_t *in)

if (size == 0
&& !(c->buffered & NGX_LOWLEVEL_BUFFERED)
&& !(last && c->need_last_buf))
&& !(last && c->need_last_buf)
&& !(flush && c->need_flush_buf))
{
if (last || flush || sync) {
for (cl = r->out; cl; /* void */) {
Expand Down
2 changes: 1 addition & 1 deletion src/http/v2/ngx_http_v2.h
Original file line number Diff line number Diff line change
Expand Up @@ -153,12 +153,12 @@ struct ngx_http_v2_connection_s {
ngx_queue_t dependencies;
ngx_queue_t closed;

ngx_uint_t closed_nodes;
ngx_uint_t last_sid;
ngx_uint_t last_push;

time_t lingering_time;

unsigned closed_nodes:8;
unsigned settings_ack:1;
unsigned table_update:1;
unsigned blocked:1;
Expand Down
7 changes: 6 additions & 1 deletion src/http/v2/ngx_http_v2_filter_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -665,6 +665,7 @@ ngx_http_v2_header_filter(ngx_http_request_t *r)

fc->send_chain = ngx_http_v2_send_chain;
fc->need_last_buf = 1;
fc->need_flush_buf = 1;

return ngx_http_v2_filter_send(fc, stream);
}
Expand Down Expand Up @@ -1815,7 +1816,11 @@ ngx_http_v2_waiting_queue(ngx_http_v2_connection_t *h2c,
static ngx_inline ngx_int_t
ngx_http_v2_filter_send(ngx_connection_t *fc, ngx_http_v2_stream_t *stream)
{
if (stream->queued == 0) {
ngx_connection_t *c;

c = stream->connection->connection;

if (stream->queued == 0 && !c->buffered) {
fc->buffered &= ~NGX_HTTP_V2_BUFFERED;
return NGX_OK;
}
Expand Down
2 changes: 1 addition & 1 deletion src/stream/ngx_stream_write_filter_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ ngx_stream_write_filter(ngx_stream_session_t *s, ngx_chain_t *in,
if (size == 0
&& !(c->buffered & NGX_LOWLEVEL_BUFFERED)
&& !(last && c->need_last_buf)
&& !(c->type == SOCK_DGRAM && flush))
&& !(flush && c->need_flush_buf))
{
if (last || flush || sync) {
for (cl = *out; cl; /* void */) {
Expand Down

0 comments on commit a767450

Please sign in to comment.