traviscross / mtr

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

Bogus error with too many CLI arguments #519

Open salfers opened 3 weeks ago

salfers commented 3 weeks ago

Run: mtr -r 1 2001:db8::babe

(of course I merely forgot the -c here)

Expected behavior

mtr reports an error that I need to give it exactly one hostname.

Actual behavior

it tries to ping 0.0.0.1 for a while and prints:

Start: 2024-11-07T12:12:25+0100
HOST: localhost                 Loss%   Snt   Last   Avg  Best  Wrst StDev
mtr: Failed to resolve host: 2001:db8::babe: Address family for hostname not supported
yvs2014 commented 1 week ago

that I need to give it exactly one hostname

you can give more than one but the same IP family only (either inet4 or inet6), at least in current implementation test out with mtr -r 0 1 1.1.1.1 8.8.8.8 or mtr -r ::1 ::1

salfers commented 1 week ago

I see. However that seems to be undocumented.