Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c2a60aec authored by Myles Watson's avatar Myles Watson
Browse files

RootCanal: Accept packets from connected devices

Bug: 202018502
Test: run/cert
      CtsVerifier LE Secure Server/Client
Tag: #feature
Change-Id: I50be22124bdf862b98a08b0091f935a0e3e66917
parent 2aaa3cc3
Loading
Loading
Loading
Loading
+10 −3
Original line number Diff line number Diff line
@@ -216,13 +216,20 @@ void LinkLayerController::IncomingPacket(
  }

  // Check connection addresses
  if (connections_.GetHandleOnlyAddress(destination_address) !=
      kReservedHandle) {
  auto source_address = incoming.GetSourceAddress();
  auto handle = connections_.GetHandleOnlyAddress(source_address);
  if (handle != kReservedHandle) {
    if (connections_.GetOwnAddress(handle).GetAddress() ==
        destination_address) {
      address_matches = true;
    }
  }

  // Drop packets not addressed to me
  if (!address_matches) {
    LOG_INFO("Dropping packet not addressed to me %s->%s",
             source_address.ToString().c_str(),
             destination_address.ToString().c_str());
    return;
  }