]> git.kaiwu.me - nginx.git/commit
QUIC: reworked migration handling.
authorVladimir Homutov <vl@nginx.com>
Wed, 19 Jan 2022 19:39:24 +0000 (22:39 +0300)
committerVladimir Homutov <vl@nginx.com>
Wed, 19 Jan 2022 19:39:24 +0000 (22:39 +0300)
commit8a4a267d74fa31e4693691a1a8788b0773329481
tree9977ce66a227ef0369b9e5e6541b175b70c892e4
parent1f97aa71ecaa75dfd646495a13534b10405b500c
QUIC: reworked migration handling.

The quic connection now holds active, backup and probe paths instead
of sockets.  The number of migration paths is now limited and cannot
be inflated by a bad client or an attacker.

The client id is now associated with path rather than socket. This allows
to simplify processing of output and connection ids handling.

New migration abandons any previously started migrations.  This allows to
free consumed client ids and request new for use in future migrations and
make progress in case when connection id limit is hit during migration.

A path now can be revalidated without losing its state.

The patch also fixes various issues with NAT rebinding case handling:
    - paths are now validated (previously, there was no validation
      and paths were left in limited state)
    - attempt to reuse id on different path is now again verified
      (this was broken in 40445fc7c403)
    - former path is now validated in case of apparent migration
src/event/quic/ngx_event_quic.c
src/event/quic/ngx_event_quic_connection.h
src/event/quic/ngx_event_quic_connid.c
src/event/quic/ngx_event_quic_connid.h
src/event/quic/ngx_event_quic_migration.c
src/event/quic/ngx_event_quic_migration.h
src/event/quic/ngx_event_quic_output.c
src/event/quic/ngx_event_quic_socket.c
src/event/quic/ngx_event_quic_socket.h
src/event/quic/ngx_event_quic_ssl.c
src/event/quic/ngx_event_quic_transport.h