Repository navigation
Conversation
pairing.request used the transport address as the remote device name, so the Accept sheet showed 0.0.0.0:0 or a TCP socket. HELLO now carries an optional deviceName/deviceType, and the answerer copies that onto pairing.request and session.connected. Address-shaped values become "Unknown device". Co-authored-by: Evan Oberfelder <evanoberfelder@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cause
Under
--pairing-policy ask, Stage A builtpairing.requestfrom the transport address and setremote_device_typeto the literalunknown.0.0.0.0:0into the framed session, so the Mac Studio Accept sheet showed 0.0.0.0:0 / unknown.The native Accept sheet and the post-accept session label both read
pairing.requestremote_device_name.Fix
HELLO inner JSON gains optional
deviceNameanddeviceType. Both are omitted when this daemon has no usable name, so legacy HELLOs and existing vectors still parse. A bind address orip:portis never sealed in and is never copied into IPC.This daemon advertises
--device-name, or the hostname with one trailing.localremoved.--device-typedefaults todesktop(phone,tablet,laptop,desktop,browser).The answerer parses the peer HELLO before Stage A and puts that name and type on
pairing.request.session.connectedcarries the same pair. When the peer sent nothing usable, both events useUnknown device/unknown.How Mac Studio shows the MacBook
--device-name, otherwise the hostname).deviceName/deviceTypefrom that HELLO before the ask prompt.pairing.requestcarries those fields. The Accept sheet shows them, and the post-accept session copies the same name.An older MacBook daemon that omits
deviceNameshows as Unknown device. The sheet does not fall back to0.0.0.0:0or192.168.4.25:55170.localbolt-native can later pass
--device-namefrom the System Settings computer name. Until that flag is set, the advertised name is the unix hostname with.localremoved.Tests
0.0.0.0:0,192.168.4.25:55170, bracketed IPs) are rejected as names.pairing.requestfrom Stage A and fromenforce_session_trustshowsEvan's MacBook Pro/laptopwhen the peer address is0.0.0.0:0.Unknown device.