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

Commit 68ec772a authored by Rahul Arya's avatar Rahul Arya Committed by Automerger Merge Worker
Browse files

Merge "Ignore LMP packets without an active link" am: 462eb76d

parents bf1bf92c 462eb76d
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -111,8 +111,9 @@ impl LinkManager {
        from: hci::Address,
        packet: lmp::PacketPacket,
    ) -> Result<(), LinkManagerError> {
        let link = self.get_link(from).ok_or(LinkManagerError::UnknownPeer)?;
        if let Some(link) = self.get_link(from) {
            link.ingest_lmp(packet);
        };
        Ok(())
    }

@@ -123,8 +124,9 @@ impl LinkManager {
            .or_else(|| hci::command_remote_device_address(&command));

        if let Some(peer) = peer {
            let link = self.get_link(peer).ok_or(LinkManagerError::UnknownPeer)?;
            if let Some(link) = self.get_link(peer) {
                link.ingest_hci(command);
            };
            Ok(())
        } else {
            Err(LinkManagerError::UnhandledHciPacket)