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:
@@ -199,6 +199,35 @@ func (s *Server) sambaLANAddress() string {
|
||||
return s.stackMgr.SambaLANAddress()
|
||||
}
|
||||
|
||||
// guestGateway resolves the guest's default gateway for the Hálózat card (R-66) — the sibling of
|
||||
// sambaLANAddress with the identical contract: live per render, never stored, "" = the row shows
|
||||
// „—". The read goes through the samba-container netns door (stacks/guestnet.go) because the
|
||||
// controller's OWN /proc/net/route answers for the docker bridge (172.x) — the S-2 wrong answer.
|
||||
func (s *Server) guestGateway() string {
|
||||
if s.guestGatewayFn != nil {
|
||||
return s.guestGatewayFn()
|
||||
}
|
||||
if s.stackMgr == nil {
|
||||
return ""
|
||||
}
|
||||
return s.stackMgr.GuestGateway()
|
||||
}
|
||||
|
||||
// guestNetSnapshot resolves the Debug dump's network section (R-66); same seam shape.
|
||||
func (s *Server) guestNetSnapshot() stacks.GuestNetSnapshot {
|
||||
if s.guestNetFn != nil {
|
||||
return s.guestNetFn()
|
||||
}
|
||||
if s.stackMgr == nil {
|
||||
return stacks.GuestNetSnapshot{Errors: map[string]string{
|
||||
"interfaces": "stack manager unavailable",
|
||||
"route": "stack manager unavailable",
|
||||
"dns": "stack manager unavailable",
|
||||
}}
|
||||
}
|
||||
return s.stackMgr.GuestNetSnapshot()
|
||||
}
|
||||
|
||||
func (s *Server) sharingPageHandler(w http.ResponseWriter, r *http.Request) {
|
||||
data := s.sharingPageData()
|
||||
if f := strings.TrimSpace(r.URL.Query().Get("flash")); f != "" {
|
||||
|
||||
Reference in New Issue
Block a user