summaryrefslogtreecommitdiff
path: root/src/uanytun.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/uanytun.c')
-rw-r--r--src/uanytun.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/uanytun.c b/src/uanytun.c
index 0e36781..ba64bc7 100644
--- a/src/uanytun.c
+++ b/src/uanytun.c
@@ -336,10 +336,16 @@ int main(int argc, char* argv[])
if(ret == -4) {
fprintf(stderr, "syntax error: unknown role name\n\n");
}
+ if(ret == -5) {
+ options_print_version();
+ }
- if(ret != -2)
+ if(ret != -2 && ret != -5)
options_print_usage();
+ if(ret == -1 || ret == -5)
+ ret = 0;
+
options_clear(&opt);
log_close();
exit(ret);