Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
2 of 4 tasks
rdp-studio opened this issue Jan 14, 2025 · 2 comments
Open
2 of 4 tasks
Labels
bug Something isn't working
Milestone

Comments

@rdp-studio
Copy link

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

@rdp-studio rdp-studio added the bug Something isn't working label Jan 14, 2025
@Nbelles
Copy link

Nbelles commented 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!

@kradalby kradalby added this to the v0.25.0 milestone Jan 27, 2025
@kradalby
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants