From fb536345c210543784a1d93cfa461ed23becbec5 Mon Sep 17 00:00:00 2001 From: benno Date: Fri, 23 Oct 2015 15:47:54 +0000 Subject: ndp -n -d does dns lookups, even with -n. it should not. found through pledge. ok deraadt@ --- usr.sbin/ndp/ndp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'usr.sbin/ndp') diff --git a/usr.sbin/ndp/ndp.c b/usr.sbin/ndp/ndp.c index 881d897d940..4ce5cf63afa 100644 --- a/usr.sbin/ndp/ndp.c +++ b/usr.sbin/ndp/ndp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ndp.c,v 1.62 2015/08/23 14:12:05 naddy Exp $ */ +/* $OpenBSD: ndp.c,v 1.63 2015/10/23 15:47:54 benno Exp $ */ /* $KAME: ndp.c,v 1.101 2002/07/17 08:46:33 itojun Exp $ */ /* @@ -488,6 +488,8 @@ delete(char *host) bzero(&hints, sizeof(hints)); hints.ai_family = AF_INET6; + if (nflag) + hints.ai_flags = AI_NUMERICHOST; gai_error = getaddrinfo(host, NULL, &hints, &res); if (gai_error) { fprintf(stderr, "ndp: %s: %s\n", host, -- cgit v1.2.3-59-g8ed1b