X-Git-Url: https://tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Ftincctl.c;h=3b006605317f47655aaece03fccee8b20390767a;hb=50e1790101efa1d695ce27498e7d7dede7ed3f9b;hp=dd0bbcc220677d97bfbc1f83cacb677e54d18ed9;hpb=a717b9bcfbe811787fd6718fb3f8fb3f272bcfb9;p=tinc diff --git a/src/tincctl.c b/src/tincctl.c index dd0bbcc2..3b006605 100644 --- a/src/tincctl.c +++ b/src/tincctl.c @@ -1857,6 +1857,8 @@ static int cmd_import(int argc, char *argv[]) { while(fgets(buf, sizeof buf, in)) { if(sscanf(buf, "Name = %s", name) == 1) { + firstline = false; + if(!check_id(name)) { fprintf(stderr, "Invalid Name in input!\n"); return 1; @@ -1881,7 +1883,6 @@ static int cmd_import(int argc, char *argv[]) { } count++; - firstline = false; continue; } else if(firstline) { fprintf(stderr, "Junk at the beginning of the input, ignoring.\n");