aboutgitcodebugslistschat
path: root/conf.c
diff options
context:
space:
mode:
Diffstat (limited to 'conf.c')
-rw-r--r--conf.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/conf.c b/conf.c
index dc9468c..d4c2a01 100644
--- a/conf.c
+++ b/conf.c
@@ -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 {