| Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
+ since number of ranges in unknown, provide a function to parse them once
again in handler to avoid memory allocation
+ ack handler now processes all ranges, not only the first
+ ECN counters are parsed and saved into frame if present
|
|
Such frames are grouped together in a switch and just ignored, instead of
closing the connection This may improve test coverage. All such frames
require acknowledgment.
|
|
The function may return NULL and result need to be checked before use.
|
|
|
|
The qc->closing flag is set when a connection close is initiated for the first
time.
No timers will be set if the flag is active.
TODO: this is a temporary solution to avoid running timer handlers after
connection (and it's pool) was destroyed. It looks like currently we have
no clear policy of connection closing in regard to timers.
|
|
Found with a previously received Initial packet with ACK only, which
instantiates a new connection but do not produce the handshake keys.
This can be triggered by a fairly well behaving client, if the server
stands behind a load balancer that stripped Initial packets exchange.
Found by F5 test suite.
|
|
|
|
Old keys retention is yet to be implemented.
|
|
While here, eliminated further difference in between.
|
|
|
|
|
|
- fixed setting of largest received packet number.
- sending properly truncated packet number
- added support for multi-byte packet number
|
|
This makes sending large number of bidirectional stream work within ngtcp2,
which doesn't bother sending optional STREAMS_BLOCKED when exhausted.
This also introduces tracking currently opened and maximum allowed streams.
|
|
|
|
|
|
The timer is set when an output frame is generated; there is no need to arm
it after it was fired.
|
|
Previously, the stub worked only with pnl=0.
|
|
Currently, the output is called periodically, each 200 ms to invoke
ngx_quic_output() that will push all pending frames into packets.
TODO: implement flags a-là Nagle & co (NO_DELAY/NO_PUSH...)
|
|
All frames collected to packet are moved into a per-namespace send queue.
QUIC connection has a timer which fires on the closest max_ack_delay time.
The frame is deleted from the queue when a corresponding packet is acknowledged.
The NGX_QUIC_MAX_RETRANSMISSION is a timeout that defines maximum length
of retransmission of a frame.
|
|
The structure contains all data that is related to the namespace:
packet number and output queue (next patch).
|
|
The quic->keys[4] array now contains secrets related to the corresponding
encryption level. All protection-level functions get proper keys and do
not need to switch manually between levels.
|
|
|
|
|
|
|
|
If early data is accepted, SSL_do_handshake() completes as soon as ClientHello
is processed. SSL_in_init() will report the handshake is still in progress.
|
|
|
|
It can either return a recoverable SSL_ERROR_WANT_READ or fatal errors.
|
|
|
|
|
|
|
|
|
|
|
|
Set r->pending_eof flag for a new QUIC stream with the fin bit. Also, keep
r->ready set when r->pending_eof is set and buffer is empty.
|
|
|
|
|
|
|
|
|
|
This allows to avoid extra allocation and use two static buffers instead.
Adjusted maximum paket size calculation: need to account a tag.
|
|
Static buffers are used instead in functions where decryption takes place.
The pkt->plaintext points to the beginning of a static buffer.
The pkt->payload.data points to decrypted data actual start.
|
|
pool->log is replaced with pkt->log or explicit argument passing where
possible.
|
|
|
|
+ ngx_quic_encrypt():
- no longer accepts pool as argument
- pkt is 1st arg
- payload is passed as pkt->payload
- performs encryption to the specified static buffer
+ ngx_quic_create_long/short_packet() functions:
- single buffer for everything, allocated by caller
- buffer layout is: [ ad | payload | TAG ]
the result is in the beginning of buffer with proper length
- nonce is calculated on stack
- log is passed explicitly, pkt is 1st arg
- no more allocations inside
+ ngx_quic_create_long_header():
- args changed: no need to pass str_t
+ added ngx_quic_create_short_header()
|
|
|
|
|
|
|
|
Additionally, streams are now removed from the tree in cleanup handler.
|
|
Now ngx_quic_stream_t is directly inserted into the tree.
|
|
|
|
Should be done after memzero.
|