File 1052-Document-restrictions-on-node-names.patch of Package erlang
From aeadf52ff7313ebe0a0a9d2ca66eced6818d9d4c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=D0=BD=D0=B0=D0=B1?= <nabijaczleweli@nabijaczleweli.xyz>
Date: Fri, 12 Dec 2025 19:57:28 +0100
Subject: [PATCH] Document restrictions on node names
lib/kernel/src/net_kernel.erl:
valid_name_head(Head) ->
{ok, MP} = re:compile("^[0-9A-Za-z_\\-]+$", [unicode]),
case re:run(Head, MP) of
{match, _} ->
true;
nomatch ->
false
end.
Sponsored-by: https://beaverlabs.net
---
system/doc/reference_manual/distributed.md | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/system/doc/reference_manual/distributed.xml b/system/doc/reference_manual/distributed.xml
index e126bd3103..13fad7c050 100644
--- a/system/doc/reference_manual/distributed.xml
+++ b/system/doc/reference_manual/distributed.xml
@@ -66,7 +66,8 @@
<seecom marker="erts:erl#sname"><c>-sname</c></seecom> (short names).
</p>
<p>The format of the node name is an atom <c>name@host</c>.
- <c>name</c> is the name given by the user. <c>host</c> is
+ <c>name</c> is the name given by the user, and consists of alphanumerics,
+ <c>-</c>, <c>_</c>, and <c>\</c>. <c>host</c> is
the full host name if long names are used, or the first part of
the host name if short names are used. Function
<seemfa marker="erts:erlang#node/0"><c>node()</c></seemfa>
--
2.51.0