Dashes in node names

Daniel Baumann computer-lazarett at web.de
Mon Nov 15 15:25:40 CET 2010


Hi,
I'am using a script which manages the setup of nodes. This depends on
zeroconf and so the tinc node name and the hostname must match.

But tinc doesn't allow dashes in node names. Is this really is
necessary? Dashes in hostnames are not really uncommon.

Is there something which prevents appling such a diff?:

----- start diff -----
diff -ruNp tinc-1.0.13/src/protocol.c tinc-1.0.13.new1/src/protocol.c
--- tinc-1.0.13/src/protocol.c 2010-03-13 18:53:33.000000000 +0100
+++ tinc-1.0.13.new1/src/protocol.c 2010-11-15 15:11:05.056142676 +0100
@@ -56,7 +56,7 @@ static avl_tree_t *past_request_tree;
 
 bool check_id(const char *id) {
        for(; *id; id++)
-               if(!isalnum(*id) && *id != '_')
+               if(!isalnum(*id) && *id != '_' && *id != '-')
                        return false;
 
        return true;
----- end diff -----

mfg,
dnjl



More information about the tinc-devel mailing list