exit(2) on unsupported positional arguments on command line

Change-Id: I4f2d70d0b0f1b7bdb8604c930aba8fbb53d8bd54
This commit is contained in:
Harald Welte 2019-12-03 22:28:19 +01:00
parent def05d3f2e
commit 92726d9ec0
1 changed files with 5 additions and 0 deletions

View File

@ -196,6 +196,11 @@ static void handle_options(int argc, char **argv)
break;
}
}
if (argc > optind) {
fprintf(stderr, "Unsupported positional arguments on command line\n");
exit(2);
}
}
int gbproxy_vty_is_config_node(struct vty *vty, int node)