summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Marie <semarie@cvs.openbsd.org>2016-02-12 05:11:30 +0000
committerSebastien Marie <semarie@cvs.openbsd.org>2016-02-12 05:11:30 +0000
commit0196c65ce5ae4612f348191f9fd3a4481c64190b (patch)
treeeb09b5159a59f10a7867e9e15946eb708aee7c14
parent7ea1dba1eda07129d63faddde6fa45f6a0167902 (diff)
pledge for "dns" if -A is passed, even with -n.
The -A (Look up the AS number for each hop address) use DNS service. ok jca@ sthen@
-rw-r--r--usr.sbin/traceroute/traceroute.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/traceroute/traceroute.c b/usr.sbin/traceroute/traceroute.c
index 80bf8cf6f1c..0f438d46700 100644
--- a/usr.sbin/traceroute/traceroute.c
+++ b/usr.sbin/traceroute/traceroute.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: traceroute.c,v 1.144 2015/11/06 19:13:36 florian Exp $ */
+/* $OpenBSD: traceroute.c,v 1.145 2016/02/12 05:11:29 semarie Exp $ */
/* $NetBSD: traceroute.c,v 1.10 1995/05/21 15:50:45 mycroft Exp $ */
/*
@@ -843,7 +843,7 @@ main(int argc, char *argv[])
sizeof(datalen)) < 0)
err(6, "SO_SNDBUF");
- if (nflag) {
+ if (nflag && !Aflag) {
if (pledge("stdio inet", NULL) == -1)
err(1, "pledge");
} else {