Skip to content

A failed Wi-Fi connect leaves the wrong passphrase in iwd with AutoConnect=true #150

Description

@eliasbakken

Found testing v1.1.0-RC8-2-g23a2bb6 on A8 s/n 0498.

What happens

After a Connect attempt with a wrong passphrase, wifi-connect restores the hotspot, but the profile it wrote stays behind:

/var/lib/iwd/Kraakeslottet.psk
[Settings]
AutoConnect=true
[Security]
Passphrase=<the wrong one>

iwd then keeps trying it by itself while the script waits for DHCP (journalctl -u iwd):

event: state, old: autoconnect_full, new: connecting (auto)
Received Deauthentication event, reason: 2, from_ap: true
event: state, old: connecting (auto), new: disconnected
event: state, old: disconnected, new: autoconnect_full
... repeats

Why it matters

Suggested direction

On failure, restore_hotspot should restore whatever profile was there before (or delete the new one). Alternatively, write the profile somewhere temporary and move it into place only on success.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions