mirror of
https://github.com/spr-networks/super.git
synced 2026-04-24 20:35:55 +03:00
[GH-ISSUE #184] iPhone device listed twice #52
Labels
No labels
blocked
bug
documentation
enhancement
fixed
fixed ✅
hardening
implemented
installer
multicast
p1
p2
pending
podman
pull-request
security
testing
v1
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/super#52
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @rgov on GitHub (Aug 11, 2023).
Original GitHub issue: https://github.com/spr-networks/super/issues/184
SPR 0.2.16 on Clearfog.
I had an existing iPhone device which I duplicated (from Safari) so that it would use the same iCloud Keychain password. After adding the device I refreshed the browser (because there's a bug where after adding a device it immediately pops up a modal). Then I renamed the device from "EVA Phone 12 mini #copy" to "EVA Phone 13 mini".
The state seemed to get a little messed up because there was an entry showing "EVA Phone 13 mini" with no PSK (showing as "N/A" on the device list, like a hardwired device), and no groups, but the correct MAC address (the iPhone's real MAC, not a random private one). And then the "EVA Phone 12 mini #copy" is populated with a WPA key but no MAC address.
The MAC shown here matches what was displayed on the iPhone's setting screen.
The phone is happy connected at 10.0.0.66 and once I added it to LAN/WAN/DNS groups it was able to access the internet. I can ping the device from another host and it responds:
The MAC address for this device does NOT appear in the
sae_passwordsfile. Therefore I'm surprised it is able to join the network.However there is a device
ff:ff:ff:ff:ff:ffwith the same shared password, not sure if that plays into it.@rgov commented on GitHub (Aug 11, 2023):
Subsequently the iPhone dropped from the network and then reattached with a new MAC address (perhaps a randomized private one), which then got assigned to the pending entry which had the right PSK. Now it's at 10.0.0.70.
@rgov commented on GitHub (Aug 11, 2023):
Here are the new phone connecting as
:6aand then again as:30:But also these
wifi:auth:failevents. Quite surprising to go back to 7 PM.@rgov commented on GitHub (Aug 11, 2023):
Phone connected again as
:6aand I was able to compare thesae_passwordsfile. Indeed it seems to be theff:ff:ff:ff:ff:ffentry that appears when this device can auth:Confirmed that there is only one entry for this
:6aMAC in my devices.json and indeed it does not have a PSK associated with it, as shown in the first post.@rgov commented on GitHub (Aug 11, 2023):
Ok, here's my theory. The issue involves having two device entries:
When SPR regenerates the
sae_passwordsfile, it adds a wildcard entry for the pending device, entry 2:github.com/spr-networks/super@99d7281e66/api/code/radios.go (L56-L60)The station connects, and provides the password that matches the wildcard entry, so it gets authed.
Somewhere else in the system it uses the station MAC address to decide what IP address, groups, tags, etc. to apply. This matches device entry 1, before it decides to overwrite the "pending" entry. Thus the device gets assigned 10.0.0.66.
@rgov commented on GitHub (Aug 15, 2023):
@lts-rad Does this reproduce for you, maybe one of the parts of this issue?
@lts-rad commented on GitHub (Aug 16, 2023):
havent had a chance to try yet. so it sounds like a UI fix is needed
and on the api end
1 ) dont accept calls w/ pending for updating/editing a device