Fix #155 synfake option deleted but present in openwrt

This commit is contained in:
Vadim Vetrov 2024-10-14 01:16:46 +03:00
parent ee56b67d20
commit 37a517eb8a
No known key found for this signature in database
GPG Key ID: E8A308689D7A73A5

17
args.c
View File

@ -426,6 +426,23 @@ int parse_args(int argc, char *argv[]) {
goto invalid_opt; goto invalid_opt;
} }
break;
case OPT_SYNFAKE:
if (strcmp(optarg, "1") == 0) {
sect_config->synfake = 1;
} else if (strcmp(optarg, "0") == 0) {
sect_config->synfake = 0;
} else {
goto invalid_opt;
}
break;
case OPT_SYNFAKE_LEN:
num = parse_numeric_option(optarg);
if (errno != 0 || num < 0) {
goto invalid_opt;
}
sect_config->synfake_len = num;
break; break;
default: default:
goto error; goto error;