projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Have tincd and tincctl use the same method of determining netname.
[tinc]
/
src
/
tincctl.c
diff --git
a/src/tincctl.c
b/src/tincctl.c
index
a3688ec
..
f547639
100644
(file)
--- a/
src/tincctl.c
+++ b/
src/tincctl.c
@@
-187,11
+187,15
@@
static bool parse_options(int argc, char **argv) {
}
}
}
}
- if(!netname) {
- netname = getenv("NETNAME");
- if(netname)
- netname = xstrdup(netname);
- }
+ if(!netname && (netname = getenv("NETNAME")))
+ netname = xstrdup(netname);
+
+ /* netname "." is special: a "top-level name" */
+
+ if(!strcmp(netname, ".")) {
+ free(netname);
+ netname = NULL;
+ }
return true;
}
return true;
}