]> git.kaiwu.me - nginx.git/commit
QUIC: keep stream sockaddr and addr_text constant.
authorRoman Arutyunyan <arut@nginx.com>
Thu, 11 May 2023 15:40:11 +0000 (19:40 +0400)
committerRoman Arutyunyan <arut@nginx.com>
Thu, 11 May 2023 15:40:11 +0000 (19:40 +0400)
commit885c4881915e28661f341b9ac3807afb84c8b779
treea21dbe246654401b3815d8cff039c7f53254f36c
parenta4319bc496264f94ea8a85702d9b5b8098d9d18c
QUIC: keep stream sockaddr and addr_text constant.

HTTP and Stream variables $remote_addr and $binary_remote_addr rely on
constant client address, particularly because they are cacheable.
However, QUIC client may migrate to a new address.  While there's no perfect
way to handle this, the proposed solution is to copy client address to QUIC
stream at stream creation.

The change also fixes truncated $remote_addr if migration happened while the
stream was active.  The reason is addr_text string was copied to stream by
value.
src/event/quic/ngx_event_quic_streams.c