Skip to content

Commit 4b83f90

Browse files
committed
added -h option h as hack protection
set the DOS_PROTECTION bool to true
1 parent 4d74162 commit 4b83f90

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

general/lib/io/config_file.c

+4-1
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,17 @@ char *conf_opts_root_dir(char *opt) {
5959
int conf_read_opt(int argc, char *argv[], struct Configs *configs) {
6060
int opt;
6161

62-
while ((opt = getopt(argc, argv, "m:d:p:i:")) != -1) {
62+
while ((opt = getopt(argc, argv, "m:d:p:i:h")) != -1) {
6363
switch (opt) {
6464
case 'p':
6565
configs->port_number = conf_opts_port_number(optarg);
6666
break;
6767
case 'm':
6868
configs->mode_concurrency = conf_opts_mode_concurrency(optarg);
6969
break;
70+
case 'h':
71+
DOS_PROTECTION = 1;
72+
break;
7073
case 'i':
7174
if (strlen(optarg) > BUFFER_SIZE - 1) {
7275
fprintf(stderr, "config_file.c/ conf_read_opt error in external_ip");

0 commit comments

Comments
 (0)