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

Commit 4f93e738 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "RootCanal: Accept packets from connected devices"

parents 0de54db9 c2a60aec
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;
  }