Discussion:
traceroute: pledge "dns" problem
Sebastien Marie
2016-02-11 19:21:28 UTC
Permalink
Hi,

I noted that calling traceroute with -nA result to pledge to abort.

$ traceroute -nA openbsd.org
traceroute to openbsd.org (129.128.5.194), 64 hops max, 40 byte packets
Abort trap (core dumped)

It is due because with -n we don't request for "dns" promise, whereas
-A (Look up the AS number for each hop address) uses DNS service for
resolv the AS number.

Ok or comments ?
--
Sebastien Marie

Index: traceroute.c
===================================================================
RCS file: /cvs/src/usr.sbin/traceroute/traceroute.c,v
retrieving revision 1.144
diff -u -p -r1.144 traceroute.c
--- traceroute.c 6 Nov 2015 19:13:36 -0000 1.144
+++ traceroute.c 11 Feb 2016 19:19:07 -0000
@@ -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 {
Jérémie Courrèges-Anglas
2016-02-11 20:13:18 UTC
Permalink
Post by Sebastien Marie
Hi,
I noted that calling traceroute with -nA result to pledge to abort.
$ traceroute -nA openbsd.org
traceroute to openbsd.org (129.128.5.194), 64 hops max, 40 byte packets
Abort trap (core dumped)
It is due because with -n we don't request for "dns" promise, whereas
-A (Look up the AS number for each hop address) uses DNS service for
resolv the AS number.
Ok or comments ?
ok
--
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE
Loading...