R-66: the box's own address becomes visible (v0.159.0)
Leg A: „Hálózat" card on Beállítások → Rendszer — Helyi cím (LAN), Hálózati név (only while Megosztás is enabled), Átjáró; live per render, stored nowhere (S-5), „—" on unavailable. Leg B: network section in the Debug system dump (interfaces/route/DNS/ lan_address), best-effort per item via the samba-netns door. Leg C: NetBIOS trap named — Szerver field helper text + a purely lexical hint on unreachable failures for single-label non-IP names. Design note: all guest-net reads go through docker exec into the host-networked felhom-samba container (stacks/guestnet.go, one seam) — the controller's own netns is the docker bridge, so /proc/net/route etc. would answer 172.x (the S-2 trap). Red-proofs: A2 gate-drop and C2 lexical-invert both failed as required. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UuFPHmHNrCJj1VhY6QdDMU
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"net"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
@@ -323,7 +324,15 @@ func (s *Server) pollAgentVerify(ctx context.Context, agent netAgent, jobID stri
|
||||
func netAddMessage(category, server string, mappedUID int) string {
|
||||
switch category {
|
||||
case "unreachable":
|
||||
return "A szerver nem érhető el (" + server + "). Ellenőrizze az IP-címet, és hogy a NAS be van-e kapcsolva."
|
||||
msg := "A szerver nem érhető el (" + server + "). Ellenőrizze az IP-címet, és hogy a NAS be van-e kapcsolva."
|
||||
// R-66 Leg C: a single-label non-IP server (»FELHOM«) is almost always a Windows/NetBIOS
|
||||
// network name, which this box generally cannot resolve — name the trap instead of letting
|
||||
// the generic text teach nothing. Purely lexical on the submitted value: NO NetBIOS/mDNS
|
||||
// resolution is ever attempted, and an IP or dotted DNS name never gets nagged about this.
|
||||
if looksLikeFlatNetworkName(server) {
|
||||
msg += " Tipp: a(z) »" + server + "« Windows-hálózati névnek tűnik — használja az eszköz IP-címét."
|
||||
}
|
||||
return msg
|
||||
case "nfs_export":
|
||||
return "A megosztás nem található, vagy a NAS nem engedélyezi ennek a gépnek a hozzáférését. Ellenőrizze az export útvonalát, és hogy a NAS engedélyezi-e a Felhom gép IP-címét."
|
||||
case "smb_auth":
|
||||
@@ -345,6 +354,15 @@ func netAddMessage(category, server string, mappedUID int) string {
|
||||
}
|
||||
}
|
||||
|
||||
// looksLikeFlatNetworkName reports whether a submitted server value is a single-label non-IP name
|
||||
// (no dot, not an IP literal) — the NetBIOS-name shape. `nas.local` (dotted) and any parseable IP
|
||||
// (v4 or v6 — colons carry the v6 case through ParseIP) are NOT flagged: the hint must never nag
|
||||
// someone who typed a resolvable form (R-66 C2/C3).
|
||||
func looksLikeFlatNetworkName(server string) bool {
|
||||
s := strings.TrimSpace(server)
|
||||
return s != "" && !strings.Contains(s, ".") && net.ParseIP(s) == nil
|
||||
}
|
||||
|
||||
// trimNetDetail bounds the raw detail shown in the UI collapsible.
|
||||
func trimNetDetail(d string) string {
|
||||
d = strings.TrimSpace(d)
|
||||
|
||||
Reference in New Issue
Block a user