Skip to content

Commit

Permalink
Copy Full Route (microsoft#2161)
Browse files Browse the repository at this point in the history
  • Loading branch information
nibanks authored Nov 19, 2021
1 parent bc96f53 commit 9718dc3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/core/connection.c
Original file line number Diff line number Diff line change
Expand Up @@ -181,16 +181,16 @@ QuicConnAlloc(
Connection->Stats.QuicVersion = Packet->Invariant->LONG_HDR.Version;
QuicConnOnQuicVersionSet(Connection);

Path->Route.LocalAddress = Datagram->Route->LocalAddress;
Path->Route = *Datagram->Route;
Connection->State.LocalAddressSet = TRUE;
Connection->State.RemoteAddressSet = TRUE;

QuicTraceEvent(
ConnLocalAddrAdded,
"[conn][%p] New Local IP: %!ADDR!",
Connection,
CASTED_CLOG_BYTEARRAY(sizeof(Path->Route.LocalAddress), &Path->Route.LocalAddress));

Path->Route.RemoteAddress = Datagram->Route->RemoteAddress;
Connection->State.RemoteAddressSet = TRUE;
QuicTraceEvent(
ConnRemoteAddrAdded,
"[conn][%p] New Remote IP: %!ADDR!",
Expand Down
3 changes: 1 addition & 2 deletions src/core/path.c
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,7 @@ QuicConnGetPathForDatagram(
Path->DestCid = Connection->Paths[0].DestCid; // TODO - Copy instead?
}
Path->Binding = Connection->Paths[0].Binding;
Path->Route.LocalAddress = Datagram->Route->LocalAddress;
Path->Route.RemoteAddress = Datagram->Route->RemoteAddress;
Path->Route = *Datagram->Route;
QuicPathValidate(Path);

return Path;
Expand Down

0 comments on commit 9718dc3

Please sign in to comment.