]> git.meshlink.io Git - meshlink/blobdiff - src/tincctl.c
Let tincctl use the NETNAME environment variable if no -n option is given.
[meshlink] / src / tincctl.c
index 4f06daa63bce5d6e6506f761f3b2070ecbcb867d..d1df07beefbd803b0b53122aab0088bd1e485dd7 100644 (file)
@@ -138,6 +138,12 @@ static bool parse_options(int argc, char **argv) {
                }
        }
 
+       if(!netname) {
+               netname = getenv("NETNAME");
+               if(netname)
+                       netname = xstrdup(netname);
+       }
+
        return true;
 }