diff options
| -rw-r--r-- | conf.c | 20 |
1 files changed, 10 insertions, 10 deletions
@@ -160,16 +160,6 @@ static void conf_ports_range_except(const struct ctx *c, char optname, else assert(0); - if (addr) { - if (!c->ifi4 && inany_v4(addr)) { - die("IPv4 is disabled, can't use -%c %s", - optname, optarg); - } else if (!c->ifi6 && !inany_v4(addr)) { - die("IPv6 is disabled, can't use -%c %s", - optname, optarg); - } - } - for (base = first; base <= last; base++) { if (exclude && bitmap_isset(exclude, base)) continue; @@ -335,6 +325,16 @@ static void conf_ports(const struct ctx *c, char optname, const char *optarg, addr = NULL; } + if (addr) { + if (!c->ifi4 && inany_v4(addr)) { + die("IPv4 is disabled, can't use -%c %s", + optname, optarg); + } else if (!c->ifi6 && !inany_v4(addr)) { + die("IPv6 is disabled, can't use -%c %s", + optname, optarg); + } + } + /* Mark all exclusions first, they might be given after base ranges */ p = spec; do { |
