summaryrefslogtreecommitdiffhomepage
path: root/src (follow)
AgeCommit message (Collapse)AuthorFilesLines
2020-10-27QUIC: revised value separators in debug and error messages.Vladimir Homutov3-69/+72
All values are prefixed with name and separated from it using colon. Multiple values are listed without commas in between. Rationale: this greatly simplifies log parsing for analysis.
2020-10-27QUIC: single function for frame debug logging.Vladimir Homutov3-147/+208
The function may be called for any initialized frame, both rx and tx. While there, shortened level names.
2020-10-23QUIC: optimized acknowledgement generation.Vladimir Homutov2-36/+55
For application level packets, only every second packet is now acknowledged, respecting max ack delay. 13.2.1 Sending ACK Frames In order to assist loss detection at the sender, an endpoint SHOULD generate and send an ACK frame without delay when it receives an ack- eliciting packet either: * when the received packet has a packet number less than another ack-eliciting packet that has been received, or * when the packet has a packet number larger than the highest- numbered ack-eliciting packet that has been received and there are missing packets between that packet and this packet. 13.2.2. Acknowledgement Frequency A receiver SHOULD send an ACK frame after receiving at least two ack-eliciting packets.
2020-10-23QUIC: added missing "quic" prefix in debug messages.Vladimir Homutov1-2/+2
2020-10-22SSL: ssl_reject_handshake directive (ticket #195).Maxim Dounin5-42/+104
In some cases it might be needed to reject SSL handshake based on SNI server name provided, for example, to make sure an invalid certificate is not returned to clients trying to contact a name-based virtual server without SSL configured. Previously, a "ssl_ciphers aNULL;" was used for this. This workaround, however, is not compatible with TLSv1.3, in particular, when using BoringSSL, where it is not possible to configure TLSv1.3 ciphers at all. With this change, the ssl_reject_handshake directive is introduced, which instructs nginx to reject SSL handshakes with an "unrecognized_name" alert in a particular server block. For example, to reject handshake with names other than example.com, one can use the following configuration: server { listen 443 ssl; ssl_reject_handshake on; } server { listen 443 ssl; server_name example.com; ssl_certificate example.com.crt; ssl_certificate_key example.com.key; } The following configuration can be used to reject all SSL handshakes without SNI server name provided: server { listen 443 ssl; ssl_reject_handshake on; } server { listen 443 ssl; server_name ~^; ssl_certificate example.crt; ssl_certificate_key example.key; } Additionally, the ssl_reject_handshake directive makes configuring certificates for the default server block optional. If no certificates are configured in the default server for a given listening socket, certificates must be defined in all non-default server blocks with the listening socket in question.
2020-10-22Stream: proxy_ssl_conf_command directive.Maxim Dounin1-0/+34
Similarly to ssl_conf_command, proxy_ssl_conf_command can be used to set arbitrary OpenSSL configuration parameters as long as nginx is compiled with OpenSSL 1.0.2 or later, when connecting to upstream servers with SSL. Full list of available configuration commands can be found in the SSL_CONF_cmd manual page (https://www.openssl.org/docs/man1.1.1/man3/SSL_CONF_cmd.html).
2020-10-22Upstream: proxy_ssl_conf_command and friends.Maxim Dounin3-0/+104
Similarly to ssl_conf_command, proxy_ssl_conf_command (grpc_ssl_conf_command, uwsgi_ssl_conf_command) can be used to set arbitrary OpenSSL configuration parameters as long as nginx is compiled with OpenSSL 1.0.2 or later, when connecting to upstream servers with SSL. Full list of available configuration commands can be found in the SSL_CONF_cmd manual page (https://www.openssl.org/docs/man1.1.1/man3/SSL_CONF_cmd.html).
2020-10-22SSL: ssl_conf_command directive.Maxim Dounin8-0/+176
With the ssl_conf_command directive it is now possible to set arbitrary OpenSSL configuration parameters as long as nginx is compiled with OpenSSL 1.0.2 or later. Full list of available configuration commands can be found in the SSL_CONF_cmd manual page (https://www.openssl.org/docs/man1.1.1/man3/SSL_CONF_cmd.html). In particular, this allows configuring PrioritizeChaCha option (ticket #1445): ssl_conf_command Options PrioritizeChaCha; It can be also used to configure TLSv1.3 ciphers in OpenSSL, which fails to configure them via the SSL_CTX_set_cipher_list() interface (ticket #1529): ssl_conf_command Ciphersuites TLS_CHACHA20_POLY1305_SHA256; Configuration commands are applied after nginx own configuration for SSL, so they can be used to override anything set by nginx. Note though that configuring OpenSSL directly with ssl_conf_command might result in a behaviour nginx does not expect, and should be done with care.
2020-10-22Core: ngx_conf_set_keyval_slot() now accepts NGX_CONF_UNSET_PTR.Maxim Dounin3-7/+11
With this change, it is now possible to use ngx_conf_merge_ptr_value() to merge keyval arrays. This change actually follows much earlier changes in ngx_conf_merge_ptr_value() and ngx_conf_set_str_array_slot() in 1452:cd586e963db0 (0.6.10) and 1701:40d004d95d88 (0.6.22). To preserve compatibility with existing 3rd party modules, both NULL and NGX_CONF_UNSET_PTR are accepted for now.
2020-10-22QUIC: restored proper usage of ngx_quic_drop_ack_ranges().Sergey Kandaurov1-2/+4
ACK Ranges are again managed based on the remembered Largest Acknowledged sent in the packet being acknowledged, which partially reverts c01964fd7b8b.
2020-10-21QUIC: fixed dropping output ack ranges on input ack.Vladimir Homutov1-6/+11
While there, additional debug messages were added.
2020-10-21QUIC: added macro for unset packet number.Vladimir Homutov1-18/+20
2020-10-20QUIC: drop acknowledged ranges.Vladimir Homutov1-5/+71
13.2.4. Limiting Ranges by Tracking ACK Frames When a packet containing an ACK frame is sent, the largest acknowledged in that frame may be saved. When a packet containing an ACK frame is acknowledged, the receiver can stop acknowledging packets less than or equal to the largest acknowledged in the sent ACK frame.
2020-10-20QUIC: added ACK frame range support.Vladimir Homutov3-30/+329
The history of acknowledged packet is kept in send context as ranges. Up to NGX_QUIC_MAX_RANGES ranges is stored. As a result, instead of separate ack frames, single frame with ranges is sent.
2020-10-21QUIC: expand UDP datagrams with an ack-eliciting Initial packet.Sergey Kandaurov1-5/+16
Per draft-ietf-quic-transport-32 on the topic: : Similarly, a server MUST expand the payload of all UDP datagrams carrying : ack-eliciting Initial packets to at least the smallest allowed maximum : datagram size of 1200 bytes.
2020-10-21QUIC: teach how to compute only the length of created QUIC headers.Sergey Kandaurov1-0/+10
It will be used for precise expansion of UDP datagram payload.
2020-10-21QUIC: simplified ngx_quic_create_long_header().Sergey Kandaurov1-1/+1
As seen in the quic-transport draft, which this implementation follows: Initial packets sent by the server MUST set the Token Length field to zero.
2020-10-21QUIC: avoided excessive initialization in ngx_quic_send_frames().Sergey Kandaurov1-2/+0
A zero-length token was used to initialize a prezeroed packet header.
2020-10-21QUIC: sorted ngx_quic_send_frames() declarations.Sergey Kandaurov1-2/+2
2020-10-19QUIC: account packet header length in amplification limit.Vladimir Homutov2-2/+4
This is the restoration of 02ee77f8d53d accidentally reverted by 93be5658a250.
2020-10-19QUIC: reverted previous 3 commits.Vladimir Homutov8-434/+28
Changes were intended for the test repository.
2020-10-19try: --skiptestsVladimir Homutov1-5/+65
2020-10-14QUIC: added ACK frame range support.Vladimir Homutov3-21/+293
The history of acknowledged packet is kept in send context as ranges. Up to NGX_QUIC_MAX_RANGES ranges is stored. As a result, instead of separate ack frames, single frame with ranges is sent.
2020-10-13Cpp test: added stream.Ruslan Ermilov1-0/+2
2020-10-08Limit req: unlocking of nodes on complex value errors.Maxim Dounin1-15/+27
Previously, if there were multiple limits configured, errors in ngx_http_complex_value() during processing of a non-first limit resulted in reference count leak in shared memory nodes of already processed limits. Fix is to explicity unlock relevant nodes, much like we do when rejecting requests.
2020-10-03Mail: proxy_smtp_auth directive.Maxim Dounin2-4/+87
The proxy_smtp_auth directive instructs nginx to authenticate users on backend via the AUTH command (using the PLAIN SASL mechanism), similar to what is normally done for IMAP and POP3. If xclient is enabled along with proxy_smtp_auth, the XCLIENT command won't try to send the LOGIN parameter.
2020-10-03Version bump.Maxim Dounin1-2/+2
2020-09-29Proxy: error checking for array init, missed in 7716:d6a5e14aa3e4.Maxim Dounin1-1/+3
Found by Coverity (CID 1467637).
2020-09-29Userid: userid_flags fixup.Maxim Dounin1-7/+9
In 7717:e3e8b8234f05, the 1st bit was incorrectly used. It shouldn't be used for bitmask values, as it is used by NGX_CONF_BITMASK_SET. Additionally, special value "off" added to make it possible to clear inherited userid_flags value.
2020-09-28Resolver: improved error messages (ticket #2024).Maxim Dounin1-16/+16
2020-09-28Userid: userid_flags directive to set cookie flags.Maxim Dounin1-0/+72
2020-09-27Proxy: added the "proxy_cookie_flags" directive.Ruslan Ermilov1-30/+552
2020-09-27Proxy: changed interface of some internal functions.Ruslan Ermilov1-32/+30
This is in preparation for the next change. Also, moved optimization from ngx_http_proxy_rewrite_regex_handler() to ngx_http_proxy_rewrite().
2020-09-27Proxy: strengthen syntax checking for some directives.Ruslan Ermilov1-12/+20
The "false" parameter of the proxy_redirect directive is deprecated. Warning has been emitted since c2230102df6f (0.7.54). The "off" parameter of the proxy_redirect, proxy_cookie_domain, and proxy_cookie_path directives tells nginx not to inherit the configuration from the previous configuration level. Previously, after specifying the directive with the "off" parameter, any other directives were ignored, and syntax checking was disabled. The syntax was enforced to allow either one directive with the "off" parameter, or several directives with other parameters. Also, specifying "proxy_redirect default foo" no longer works like "proxy_redirect default".
2020-09-15SSL: added the "ssl_keys_file" directive.Vladimir Homutov4-0/+72
2020-10-15QUIC: account packet header length in amplification limit.Vladimir Homutov2-2/+4
Header length calculation is adjusted to account real connection id lengths instead of worst case.
2020-10-12QUIC: fixed ngx_http_upstream_init() much like HTTP/2 connections.Sergey Kandaurov1-0/+7
2020-10-09QUIC: reset error and error_reason prior to processing packet.Vladimir Homutov1-0/+5
2020-10-07QUIC: fixed dead store assignment.Sergey Kandaurov1-1/+1
Found by Clang Static Analyzer.
2020-10-07QUIC: fixed format specifier in debug message.Vladimir Homutov1-1/+1
2020-10-02QUIC: added debug message with final packet processing status.Vladimir Homutov2-0/+30
2020-10-07QUIC: set local_socklen in stream connections.Roman Arutyunyan1-0/+1
Previously, this field was not set while creating a QUIC stream connection. As a result, calling ngx_connection_local_sockaddr() led to getsockname() bad descriptor error.
2020-10-02QUIC: enabled more key-related debug by default.Vladimir Homutov2-4/+13
2020-10-02QUIC: added connection id debug.Vladimir Homutov1-2/+0
2020-10-07QUIC: updated c->log->action strings to reflect proper state.Vladimir Homutov1-6/+13
2020-10-07QUIC: fixed memory leak in ngx_quic_send_frames().Vladimir Homutov1-0/+3
The function did not free passed frames in case of error.
2020-10-06QUIC: fixed measuring ACK Delay against 0-RTT packets.Sergey Kandaurov1-2/+6
2020-10-05QUIC: do not resend empty queue when speeding up handshake.Sergey Kandaurov1-1/+6
If client acknowledged an Initial packet with CRYPTO frame and then sent another Initial packet containing duplicate CRYPTO again, this could result in resending frames off the empty send queue.
2020-10-05QUIC: zero out packet length in frames prior to send.Sergey Kandaurov1-0/+1
It could be that a frame was previously sent and may have stale information. This was previously broken by merging frames on resend in b383120afca3.
2020-10-05QUIC: fixed build with clang and NGX_QUIC_DEBUG_CRYPTO enabled.Vladimir Homutov1-1/+4
The ngx_quic_hexdump() function is wrapped into macros to cast "data" argument to "* u_char".