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

Commit 462eb76d authored by Rahul Arya's avatar Rahul Arya Committed by Gerrit Code Review
Browse files

Merge "Ignore LMP packets without an active link"

parents a21f10ff 43feb2ec
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)