In parse_argv() alias is not allowed if a program is being run in a server mode.
This commit is contained in:
parent
7d08203d61
commit
719624e4c2
@ -330,6 +330,9 @@ int parse_argv(int argc, const char **argv, struct options *opts) {
|
||||
r = inet_pton(AF_INET6, opts->addr, &test);
|
||||
opts->is_alias_passed = r == 0;
|
||||
|
||||
if (opts->command == 's' && opts->is_alias_passed)
|
||||
return -1;
|
||||
|
||||
if (opts->command == '\0' || opts->addr[0] == '\0'
|
||||
|| (!opts->is_alias_passed && opts->port == NULL))
|
||||
return -1;
|
||||
|
Loading…
Reference in New Issue
Block a user