Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MTR -a and dest hostname resolving one IPv6 #510

Open
paulofragoso opened this issue Jul 23, 2024 · 3 comments
Open

MTR -a and dest hostname resolving one IPv6 #510

paulofragoso opened this issue Jul 23, 2024 · 3 comments

Comments

@paulofragoso
Copy link

paulofragoso commented Jul 23, 2024

Hi Folks,

When I'm using mtg with -a and IPv4 to reach host name like meet.google.com it's reporting:

mtr: invalid local address

because destination are using IPv6 from gethostbyname. Is possible change to more clear error and suggest to use -4? Or to use IPv4 from gethostbyname when using -a with IPv4?

Thanks,
Paulo.

@yvs2014
Copy link

yvs2014 commented Jul 23, 2024

mtr(8) reads:

      -a ADDRESS, --address ADDRESS
              Use this option to bind the outgoing socket to ADDRESS, so that all packets will be sent with ADDRESS as source address.

if you with mtr are not being on the meet.google.com, then '-a meet.google.com' is terminated with totally correct 'invalid local address' message.

@rewolff
Copy link
Collaborator

rewolff commented Jul 23, 2024

@yvs2014 I think @paulofragoso is doing -a <somelocaladdress> meet.google.com And that local address might be IPV4 which doesn't work if your kernel is IPV6 enabled. So he got a confusing message instead of something explaining the situation.

@paulofragoso : I am opposed to "guessing the cause of the error messages". A long time ago the DOS (3.11 I think. or was it 6.x?) command "rmdir" would "know" that if the OS gave an error, it MUST be that the directory didn't exist to begin with. So when you tried rmdir on a network drive, you'd get: "rmdir: directory doesn't exist", when you could clearly see the directory. Turns out it was a "permission denied" error and rmdir was written when that wasn't one of the possible return codes for the system call...

So MTR reports what the OS tells us. If we implement a special case for this situation and end up getting this error later with a different cause, it is going to cause even bigger confusion.

IMHO the "invalid local address" is 100% correct. You've provided an incorrect local address for what you're asking mtr to do.

@paulofragoso
Copy link
Author

@rewolff is exactly this and I agree that all is correct but I think that one check between -a and dest_host_name are in same stack (IPv4 or IPv6) will help network operators in hot time, because use host name for destination is common.

Many Thanks for attention!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants