Skip to content

Commit

Permalink
Change local address only before started.
Browse files Browse the repository at this point in the history
  • Loading branch information
masa-koz committed Apr 6, 2024
1 parent dd92883 commit 8ec48c6
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions src/core/connection.c
Original file line number Diff line number Diff line change
Expand Up @@ -6535,15 +6535,10 @@ QuicConnParamSet(
break;
}

Connection->State.LocalAddressSet = TRUE;
CxPlatCopyMemory(&Connection->Paths[0].Route.LocalAddress, Buffer, sizeof(QUIC_ADDR));
QuicTraceEvent(
ConnLocalAddrAdded,
"[conn][%p] New Local IP: %!ADDR!",
Connection,
CASTED_CLOG_BYTEARRAY(sizeof(Connection->Paths[0].Route.LocalAddress), &Connection->Paths[0].Route.LocalAddress));

if (Connection->State.Started) {
if (!Connection->State.Started) {
Connection->State.LocalAddressSet = TRUE;
CxPlatCopyMemory(&Connection->Paths[0].Route.LocalAddress, Buffer, sizeof(QUIC_ADDR));
} else {
CXPLAT_DBG_ASSERT(Connection->State.RemoteAddressSet);
QUIC_PATH* Path = QuicConnGetPathByAddress(Connection, LocalAddress, &Connection->Paths[0].Route.RemoteAddress);
if (Path != NULL) {
Expand Down

0 comments on commit 8ec48c6

Please sign in to comment.