]> git.meshlink.io Git - meshlink/commitdiff
Fix node name check for "connect" and "disconnect" commands.
authorGuus Sliepen <guus@tinc-vpn.org>
Thu, 30 Aug 2012 12:00:34 +0000 (14:00 +0200)
committerGuus Sliepen <guus@tinc-vpn.org>
Thu, 30 Aug 2012 12:00:34 +0000 (14:00 +0200)
src/tincctl.c

index fa5253371a548e5473193ba92e184d5454b0f8a0..00d8eb903d27fcddca01741105dea06deb769729 100644 (file)
@@ -928,7 +928,7 @@ static int cmd_connect(int argc, char *argv[]) {
                return 1;
        }
 
-       if(!check_id(argv[2])) {
+       if(!check_id(argv[1])) {
                fprintf(stderr, "Invalid name for node.\n");
                return 1;
        }
@@ -951,7 +951,7 @@ static int cmd_disconnect(int argc, char *argv[]) {
                return 1;
        }
 
-       if(!check_id(argv[2])) {
+       if(!check_id(argv[1])) {
                fprintf(stderr, "Invalid name for node.\n");
                return 1;
        }