render_livekit_yaml emits invalid CIDR for IPv4 node_ip — /128 hardcoded #36
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?
Symptom
On a single-user / public deploy where
node_ipis an IPv4 address (e.g.185.206.122.48), the supervisor writes a config that crashes livekit-server immediately on startup:No signaling, no media, no huddles. Hard-fails before binding any port.
Cause
render_livekit_yaml(crates/hero_livekit_server/src/livekit/rpc.rs~L939) hardcodes/128inrtc.ips.includes:/128is a valid single-host prefix for IPv6 but invalid for IPv4 (where the equivalent is/32). Pion (the Go UDP layer in livekit-server) parses the CIDR strictly and rejects.Why it worked until now
The hardcoded
/128was added by PR #32 to defend against UDP port-mux EADDRINUSE collisions on multi-user mycelium hosts, wherenode_ipis always an IPv6 address. Single-user / public-IP deploys weren't part of the test matrix.Reproduction
Fix (PR #36)
Detect address family at render time:
/32/128(unchanged — multi-user mycelium path is preserved)Verified on both deploy shapes:
/32, livekit-server binds all 3 ports cleanly4a0:6976:8fa7:efc:5::1): yaml unchanged at/128, no regression