From 065d24d44b48f3808f1f40a8b8f41c6d9c1ff5e9 Mon Sep 17 00:00:00 2001 From: Myles Watson <mylesgw@google.com> Date: Tue, 17 May 2022 16:23:00 -0700 Subject: [PATCH] RootCanal: Use the resolved address type Bug: 230123996 Test: gd/cert Change-Id: I3f609fe5f248e214ec7fb2ae75f6dc1e886d3059 --- tools/rootcanal/model/controller/link_layer_controller.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/rootcanal/model/controller/link_layer_controller.cc b/tools/rootcanal/model/controller/link_layer_controller.cc index 069713e1601..c7cbe519724 100644 --- a/tools/rootcanal/model/controller/link_layer_controller.cc +++ b/tools/rootcanal/model/controller/link_layer_controller.cc @@ -1685,9 +1685,10 @@ uint16_t LinkLayerController::HandleLeConnection( AddressType peer_address_type = address.GetAddressType(); if (peer_resolved_address != AddressWithType()) { peer_resolvable_private_address = address.GetAddress(); - if (address.GetAddressType() == AddressType::PUBLIC_DEVICE_ADDRESS) { + if (peer_resolved_address.GetAddressType() == + AddressType::PUBLIC_DEVICE_ADDRESS) { peer_address_type = AddressType::PUBLIC_IDENTITY_ADDRESS; - } else if (address.GetAddressType() == + } else if (peer_resolved_address.GetAddressType() == AddressType::RANDOM_DEVICE_ADDRESS) { peer_address_type = AddressType::RANDOM_IDENTITY_ADDRESS; } else { -- GitLab