Watchdog and Monitor looked the partner up by exact key, and the remote probe passed a quote to cut as a filename
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
<?php
|
||||
require_once __DIR__ . '/common.php';
|
||||
require_once __DIR__ . '/partnership.php'; // vv_pt_peer_match() — tailnet name vs conf hostname
|
||||
|
||||
// ═══════════════════════════════════════════════════════════════════════════════════════════════
|
||||
// PURPOSE
|
||||
@@ -94,7 +95,11 @@ function vv_partner_state(): array {
|
||||
if (!$hostname) continue;
|
||||
$isMe = ($id === $myHostId);
|
||||
$isOwner = strcasecmp($id, $vars['PARTNERSHIP_OWNER_HOST'] ?? '') === 0;
|
||||
$online = $isMe ? true : ($tsPeers[strtolower($hostname)] ?? null);
|
||||
// Exact-key lookup, until now. The tailnet name and the conf hostname differ by one
|
||||
// character on this mesh, so the partner card reported a host that was up as unknown.
|
||||
// Same unambiguous-prefix rule as everywhere else — one candidate or none.
|
||||
$peerKey = $isMe ? null : vv_pt_peer_match(array_keys($tsPeers), $hostname);
|
||||
$online = $isMe ? true : ($peerKey !== null ? $tsPeers[$peerKey] : null);
|
||||
$onboardPhase = $isMe ? null
|
||||
: (($setupDb[$id . '_PHASE2_DONE'] ?? '') === 'true' ? 2
|
||||
: (($setupDb[$id . '_PHASE1_DONE'] ?? '') === 'true' ? 1 : 0));
|
||||
|
||||
Reference in New Issue
Block a user