headscale icon indicating copy to clipboard operation
headscale copied to clipboard

[Bug] If a computer set an invalid hostname, the entire network will be unavailable

Open rdp-studio opened this issue 11 months ago • 3 comments

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

  1. Setup a invalid hostname (such as Chinese "我的电脑") on client
  2. tailscale up
  3. 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

rdp-studio avatar Jan 14 '25 10:01 rdp-studio

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!

Nbelles avatar Jan 26 '25 15:01 Nbelles

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

kradalby avatar Jan 27 '25 21:01 kradalby

This issue is stale because it has been open for 90 days with no activity.

github-actions[bot] avatar Apr 30 '25 02:04 github-actions[bot]

This issue was closed because it has been inactive for 14 days since being marked as stale.

github-actions[bot] avatar May 07 '25 02:05 github-actions[bot]