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

Closed
opened 2025-12-29 02:25:45 +01:00 by adam · 4 comments
Owner

Originally created by @rdp-studio on GitHub (Jan 14, 2025).

Is this a support request?

  • This is not a support request

Is there an existing issue for this?

  • 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

Originally created by @rdp-studio on GitHub (Jan 14, 2025). ### 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 ```markdown - 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_
adam added the stalebug labels 2025-12-29 02:25:45 +01:00
adam closed this issue 2025-12-29 02:25:45 +01:00
Author
Owner

@Nbelles commented on GitHub (Jan 26, 2025):

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 commented on GitHub (Jan 26, 2025): 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!
Author
Owner

@kradalby commented on GitHub (Jan 27, 2025):

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 commented on GitHub (Jan 27, 2025): 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
Author
Owner

@github-actions[bot] commented on GitHub (Apr 30, 2025):

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

@github-actions[bot] commented on GitHub (Apr 30, 2025): This issue is stale because it has been open for 90 days with no activity.
Author
Owner

@github-actions[bot] commented on GitHub (May 7, 2025):

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

@github-actions[bot] commented on GitHub (May 7, 2025): This issue was closed because it has been inactive for 14 days since being marked as stale.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#906