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

"Address not available" interrupts working mtr #514

Open
arekm opened this issue Aug 25, 2024 · 1 comment
Open

"Address not available" interrupts working mtr #514

arekm opened this issue Aug 25, 2024 · 1 comment

Comments

@arekm
Copy link
Contributor

arekm commented Aug 25, 2024

Scenario:
mtr some-address

now our machine gets kicked out out wifi AP or network is restarted. mtr will, in such case (kicked out of AP; so for some short time it has no ip address assigned), exit with "Address not available" error.

But IMO if it mtr was started and was working for some time and only then "Address not available" happened then it shouldn't stop but instead just report failed packets.

Failure was introduced by @matt-kimball in commit 4149c2c

Maybe just revert that part:

diff --git a/ui/cmdpipe.c b/ui/cmdpipe.c
index 81acb9c..10de21d 100644
--- a/ui/cmdpipe.c
+++ b/ui/cmdpipe.c
@@ -663,11 +663,6 @@ void handle_reply_errors(
         error(EXIT_FAILURE, 0, "Address in use");
     }

-    if (!strcmp(reply_name, "address-not-available")) {
-        display_close(ctl);
-        error(EXIT_FAILURE, 0, "Address not available");
-    }
-
     if (!strcmp(reply_name, "unexpected-error")) {
         display_close(ctl);
         error(EXIT_FAILURE, 0, "Unexpected mtr-packet error");

or add some if (only if this error comes up for first packet) then fail?

@matt-kimball
Copy link
Contributor

I don't think it's great that errors like that completely kill the process, but I don't think ignoring them would be good either.

When running mtr in an interactive mode, it would be better to report the error as part of the user interface, and when in non-interactive mode including them in the generated report.

Of course, this is a non-trivial change to things.

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

2 participants