From 7b66094f560b1511e2efe00ed4c429c16a3a5f7c Mon Sep 17 00:00:00 2001 From: ValdikSS Date: Thu, 15 Aug 2024 14:02:06 +0300 Subject: [PATCH] Fix help print (`--help`), '?' is reserved in getopt. Broken due to 16f2a8fb8136790c1e26aa48cbbd64b327d676e8 --- src/goodbyedpi.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/goodbyedpi.c b/src/goodbyedpi.c index e2920a7..c85ae0e 100644 --- a/src/goodbyedpi.c +++ b/src/goodbyedpi.c @@ -188,7 +188,7 @@ static struct option long_options[] = { {"native-frag", no_argument, 0, '*' }, {"reverse-frag",no_argument, 0, '(' }, {"max-payload", optional_argument, 0, '|' }, - {"debug-exit", optional_argument, 0, '?' }, + {"debug-exit", optional_argument, 0, 'x' }, {0, 0, 0, 0 } }; @@ -940,7 +940,7 @@ int main(int argc, char *argv[]) { else max_payload_size = 1200; break; - case '?': // --debug-exit + case 'x': // --debug-exit debug_exit = true; break; default: @@ -1123,6 +1123,7 @@ int main(int argc, char *argv[]) { die(); } if (debug_exit) { + printf("Debug Exit\n"); exit(EXIT_SUCCESS); } printf("Filter activated, GoodbyeDPI is now running!\n");