traviscross / mtr

Official repository for mtr, a network diagnostic tool
http://www.bitwizard.nl/mtr/
GNU General Public License v2.0
2.64k stars 337 forks source link

Problems with hosts that have a NULL PTR result #449

Open Jamie-Landeg-Jones opened 1 year ago

Jamie-Landeg-Jones commented 1 year ago

I've noticed that if a host has a null result to a PTR lookup, it seems that the resultant host output isn't properly initialised / terminated.

This isn't one of my domains, I just stumbled across it.

% host 188.209.56.29 29.56.209.188.in-addr.arpa domain name pointer .

See pasted output below. With mtr v0.95 installed, I get the first output.

The second output is from mtr from github master, checked out 10 minutes ago.

Note the "host" displayed in the second case is actually the value of the host in hop 7.

The third output is done via ip6 - note again how the host in this case is actually the host from hop 6.

I've tried various other combinations, and get similar results.

2001:470:1f07:10f1::3:5 is one of mine - I set its ptr value to "." to emulate the problem.

Let me know if I can help further!

Cheers, Jamie

$ mtr -b 188.209.56.29
thompson.dyslexicfish.net (172.20.1.1) -> 188.209.56.29 (188.209.56.29)
Keys:  Help   Display mode   Restart statistics   Order of fields   quit

 Host
 1. router.home.dyslexicfish.net (172.20.0.1)
 2. 88-109-32-1.dynamic.dsl.as9105.com (88.109.32.1)
 3. ae52-ner002.bir.as13285.net (78.144.1.31)
 4. ae52-scr102.loh.as13285.net (78.144.1.30)
 5. ae62-scr101.thw.as13285.net (78.144.1.114)
 6. linx.r1.gsa.nl.as43350.com (195.66.226.121)
 7. 185.107.116.3 (185.107.116.3)
 8. �����^? (188.209.56.29)

$ ./mtr -b 188.209.56.29

thompson.dyslexicfish.net (172.20.1.1) -> 188.209.56.29 (188.209.56.29)
Keys:  Help   Display mode   Restart statistics   Order of fields   quit

 Host
 1. router.home.dyslexicfish.net (172.20.0.1)
 2. 88-109-32-1.dynamic.dsl.as9105.com (88.109.32.1)
 3. ae52-ner002.bir.as13285.net (78.144.1.31)
 4. ae52-scr102.loh.as13285.net (78.144.1.30)
 5. ae62-scr101.thw.as13285.net (78.144.1.114)
 6. linx.r1.gsa.nl.as43350.com (195.66.226.121)
 7. 185.107.116.3 (185.107.116.3)
    185.107.116.4 (185.107.116.4)
 8. 185.107.116.3 (188.209.56.29)

$ ./mtr -b 2001:470:1f07:10f1::3:5

thompson.dyslexicfish.net (2001:470:1f1d:bb::1:1) -> 2001:470:1f07:10f1::3:5
Keys:  Help   Display mode   Restart statistics   Order of fields   quit

 Host
 1. router.home.dyslexicfish.net (2001:470:1f1d:bb::1)
 2. tunnel282020.tunnel.tserv1.lon2.ipv6.he.net (2001:470:1f1c:bb::1)
 3. e0-18.core2.lon2.he.net (2001:470:0:320::1)
 4. (waiting for reply)
 5. 100ge4-1.core1.nyc4.he.net (2001:470:0:2cf::2)
 6. tserv1.nyc4.he.net (2001:470:0:5d::2)
 7. tserv1.nyc4.he.net (2001:470:1f07:10f1::3:5)