aboutgitcodebugslistschat
path: root/conf.c
diff options
context:
space:
mode:
Diffstat (limited to 'conf.c')
-rw-r--r--conf.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/conf.c b/conf.c
index 04e9956..f519a6a 100644
--- a/conf.c
+++ b/conf.c
@@ -263,7 +263,9 @@ static void conf_ports(const struct ctx *c, char optname, const char *optarg,
ifname++;
}
- if (inet_pton(AF_INET, buf, addr))
+ if (ifname == buf + 1) /* Interface without address */
+ addr = NULL;
+ else if (inet_pton(AF_INET, buf, addr))
af = AF_INET;
else if (inet_pton(AF_INET6, buf, addr))
af = AF_INET6;