summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorSebastian Benoit <benno@cvs.openbsd.org>2017-08-01 19:01:09 +0000
committerSebastian Benoit <benno@cvs.openbsd.org>2017-08-01 19:01:09 +0000
commit54d7c9152d38a854be1f9c91f02268ee4471200d (patch)
tree0d856383c78fdef660461b26ef856abd16a2281a /sbin
parent3f214365fdf1a9914ad8094a1638ff8c9acd992d (diff)
use AI_NUMERICHOST for getaddrinfo(), we can only configure ip
adresses on pflow(4) interfaces, so don't try to resolve hostnames. Report and fix from pjp -AT- centroid.eu ok florian@
Diffstat (limited to 'sbin')
-rw-r--r--sbin/ifconfig/ifconfig.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c
index d99bcb34871..08d48ac1b0d 100644
--- a/sbin/ifconfig/ifconfig.c
+++ b/sbin/ifconfig/ifconfig.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ifconfig.c,v 1.345 2017/06/25 22:22:06 stsp Exp $ */
+/* $OpenBSD: ifconfig.c,v 1.346 2017/08/01 19:01:08 benno Exp $ */
/* $NetBSD: ifconfig.c,v 1.40 1997/10/01 02:19:43 enami Exp $ */
/*
@@ -4445,6 +4445,7 @@ pflow_addr(const char *val, struct sockaddr_storage *ss) {
bzero(&hints, sizeof(hints));
hints.ai_family = AF_UNSPEC;
hints.ai_socktype = SOCK_DGRAM; /*dummy*/
+ hints.ai_flags = AI_NUMERICHOST;
if ((error = getaddrinfo(ip, port, &hints, &res0)) != 0)
errx(1, "error in parsing address string: %s",