[Bug] If a computer set an invalid hostname, the entire network will be unavailable
Is this a support request?
- [X] This is not a support request
Is there an existing issue for this?
- [X] I have searched the existing issues
Current Behavior
If a host is set with an invalid hostname (such as Chinese "我的电脑"), the entire network will become disconnected and new nodes is unable to connect.
Expected Behavior
Similar to the official implementation of tailscale, rename the node to "node" (or add some random suffixes if the name is duplicated), and then successfully connect without affecting other nodes.
Steps To Reproduce
- Setup a invalid hostname (such as Chinese "我的电脑") on client
tailscale up- entire network become disconnected
Environment
- OS: Windows 11
- Headscale version: 0.23.0
- Tailscale version: 1.78.1
Runtime environment
- [ ] Headscale is behind a (reverse) proxy
- [ ] Headscale runs in a container
Anything else?
No response
Hi,
Wanted to add that I notice the same thing when no name is provided like sudo headscale node rename -i 3 (notice the lack of provided node name). It causes the entire network to become offline until it is resolved. Depending on how long it is unnamed for, it seems to build up a pretty big backlog of requests which cause it to take even longer for them to come back online after the renaming has been resolved.
Thanks!
hmm, I am not sure what is the best way to solve this, I am not sure, but I would think they need to be prevented from having that name, this is one suggestion:
https://github.com/juanfont/headscale/pull/2383/files#diff-aa871aa287043154dac1e55b4c96c26b9a1fbddeb5d724dbcd800a9e6fc19a2cR462-R467
This issue is stale because it has been open for 90 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.