Skip to content

[BUG] Security flag lost when stronger unsecured AP found #123

@cachebag

Description

@cachebag

Describe the bug
In list_networks(), when deduplicating networks by (SSID, frequency), if a secured AP with weak signal is found first, then an unsecured AP with stronger signal is found, the entire network entry gets replace, losing the secured flag.

if strength > n.strength.unwrap_or(0) {
    *n = new_net.clone();  // Replaces entire struct
}

Expected behavior
Should preserve secured flag across all APs: n.secured = n.secured || new_net.secured;

Location
nmrs/src/scan.rs:88-100

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomersnmrsChanges to nmrs

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions