summaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)AuthorFilesLines
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-29release-1.19.3 tagMaxim Dounin1-0/+1
2020-09-29nginx-1.19.3-RELEASErelease-1.19.3Maxim Dounin1-0/+106
2020-09-29Updated OpenSSL used for win32 builds.Maxim Dounin1-1/+1
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".
2020-10-05QUIC: inline function instead of macro for hexdump.Vladimir Homutov1-12/+14
This prevents name clashes with local variables.
2020-10-01QUIC: fixed handling of incorrect packets.Vladimir Homutov1-3/+16
Instead of ignoring, connection was closed. This was broken in d0d3fc0697a0.
2020-10-01Merged with the default branch.Sergey Kandaurov16-100/+1116
2020-10-01QUIC: a bandaid for calculating ack_delay with non-monotonic time.Sergey Kandaurov1-0/+1
2020-10-01QUIC: speeding up handshake completion.Sergey Kandaurov1-3/+15
As per quic-recovery draft, section-6.2.3: resend CRYPTO frames when receiving an Initial packet containing duplicate CRYPTO data.
2020-10-01QUIC: fixed clang-ast asserts.Sergey Kandaurov2-2/+2
2020-10-01QUIC: fixed build with OpenSSL after bed310672f39.Sergey Kandaurov1-1/+1
2020-10-01QUIC: moved ssl configuration pointer to quic configuration.Vladimir Homutov6-31/+30
The ssl configuration is obtained at config time and saved for future use.
2020-09-30QUIC: added stateless reset support.Vladimir Homutov7-13/+237
The new "quic_stateless_reset_token_key" directive is added. It sets the endpoint key used to generate stateless reset tokens and enables feature. If the endpoint receives short-header packet that can't be matched to existing connection, a stateless reset packet is generated with a proper token. If a valid stateless reset token is found in the incoming packet, the connection is closed. Example configuration: http { quic_stateless_reset_token_key "foo"; ... }
2020-09-30QUIC: refined the "c->quic->initialized" flag usage.Vladimir Homutov1-53/+66
The flag is tied to the initial secret creation. The presence of c->quic pointer is sufficient to enable execution of ngx_quic_close_quic(). The ngx_quic_new_connection() function now returns the allocated quic connection object and the c->quic pointer is set by the caller. If an early error occurs before secrets initialization (i.e. in cases of invalid retry token or nginx exiting), it is still possible to generate an error response by trying to initialize secrets directly in the ngx_quic_send_cc() function. Before the change such early errors failed to send proper connection close message and logged an error. An auxilliary ngx_quic_init_secrets() function is introduced to avoid verbose call to ngx_quic_set_initial_secret() requiring local variable.
2020-09-30QUIC: packet processing refactoring.Vladimir Homutov3-475/+239
All packet header parsing is now performed by ngx_quic_parse_packet() function, located in the ngx_quic_transport.c file. The packet processing is centralized in the ngx_quic_process_packet() function which decides if the packet should be accepted, ignored or connection should be closed, depending on the connection state. As a result of refactoring, behavior has changed in some places: - minimal size of Initial packet is now always tested - connection IDs are always tested in existing connections - old keys are discarded on encryption level switch
2020-09-25QUIC: simplified packet header parsing.Vladimir Homutov2-26/+3
Now flags are processed in ngx_quic_input(), and raw->pos points to the first byte after the flags. Redundant checks from ngx_quic_parse_short_header() and ngx_quic_parse_long_header() are removed.
2020-09-25QUIC: keep the entire packet size in pkt->len.Roman Arutyunyan3-6/+7
Previously pkt->len kept the length of the packet remainder starting from pkt->raw->pos.
2020-09-18QUIC: switched to using fixed-length server connection IDs.Vladimir Homutov2-10/+5