-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dtls-server.c: check for left cli-arguments.
Signed-off-by: Achim Kraus <[email protected]>
- Loading branch information
Showing
1 changed file
with
6 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -308,7 +308,7 @@ usage(const char *program, const char *version) { | |
program = ++p; | ||
|
||
fprintf(stderr, "%s v%s -- DTLS server implementation\n" | ||
"(c) 2011-2014 Olaf Bergmann <[email protected]>\n\n" | ||
"(c) 2011-2024 Olaf Bergmann <[email protected]>\n\n" | ||
"usage: %s [-A address] [-c cipher suites] [-e] [-p port] [-r] [-v num]\n" | ||
"\t-A address\t\tlisten on specified address (default is ::)\n", | ||
program, version, program); | ||
|
@@ -386,6 +386,11 @@ main(int argc, char **argv) { | |
exit(1); | ||
} | ||
} | ||
if (argc != optind) { | ||
dtls_warn("no arguments supported!\n"); | ||
usage(argv[0], dtls_package_version()); | ||
exit(1); | ||
} | ||
listen_addr.sin6_port = port; | ||
|
||
dtls_set_log_level(log_level); | ||
|