diff --git a/src/main.c b/src/main.c index ccf1009..2eb50da 100644 --- a/src/main.c +++ b/src/main.c @@ -288,11 +288,10 @@ int parse_argv(int argc, const char **argv, struct options *opts) { } if (command_arg_num == 1) { - struct sockaddr test = {0}; - int r = inet_pton(AF_INET, opts->addr, &test); + int r = inet_pton(AF_INET, opts->addr, NULL); if (r == -1) - r = inet_pton(AF_INET6, opts->addr, &test); - opts->is_alias_passed = r != 1; + r = inet_pton(AF_INET6, opts->addr, NULL); + opts->is_alias_passed = r == 0; } // opts->is_alias_passed = ((opts->addr[0]>>4) & 0xf) != 0x3;