QUIC: avoid updating connection address for a backup path
On NAT rebinding, both the new path and the previously active path
are validated. If the previous path, now a backup, was validated
last, the connection address was updated to its address, and new
streams used it while packets were exchanged on the new path.
Validation of the previous path only checks that it is still viable
and does not make it active again, see RFC 9000, 9.3.3. The fix is
to update the connection address only for the active path. If the
client migrates back to the previous path, the address is updated in
ngx_quic_handle_migration(), as the path is already validated.
The connection address is also updated when a backup path is restored
after the active path fails validation. Commit
f37ec3e5d removed this,
assuming the address never tracked a path that could later fail; an
incomplete MTU validation breaks that assumption, as the address is
set after the first, size-limited round and before the path is
re-validated with full-size datagrams.
The problem appeared in
f37ec3e5d (1.31.0).
Reported by Keita Sode of SYZD Research LLC.