We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hello,
accidentally spotted in current version
% sudo ./mtr 0 <many lines with localhost>
non-gtk part probably can be fixed with
diff --git a/ui/net.c b/ui/net.c index efeb782..2ba94cc 100644 --- a/ui/net.c +++ b/ui/net.c @@ -746,13 +746,14 @@ int net_open( return err; } - net_reopen(ctl, res); + if (net_reopen(ctl, res) != 0) + return -1; /* fail */ return 0; } -void net_reopen( +int net_reopen( struct mtr_ctl *ctl, struct addrinfo *res) { @@ -767,6 +768,8 @@ void net_reopen( ctl->af = remotesockaddr->sa_family = sourcesockaddr->sa_family = res->ai_family; remoteaddress = sockaddr_addr_offset(remotesockaddr); memcpy(remoteaddress, sockaddr_addr_offset(res->ai_addr), sockaddr_addr_size(remotesockaddr)); + if (addrcmp(remoteaddress, &ctl->unspec_addr, ctl->af) == 0) + return -1; /* fail */ inet_ntop(remotesockaddr->sa_family, remoteaddress, remoteaddr, sizeof(remoteaddr)); sourceaddress = sockaddr_addr_offset(sourcesockaddr); @@ -780,7 +783,7 @@ void net_reopen( } else { net_find_local_address(); } - + return 0; /* norm */ } diff --git a/ui/net.h b/ui/net.h index 354c998..2488d13 100644 --- a/ui/net.h +++ b/ui/net.h @@ -34,7 +34,7 @@ extern int net_open( struct mtr_ctl *ctl, struct addrinfo *res); -extern void net_reopen( +extern int net_reopen( struct mtr_ctl *ctl, struct addrinfo *res); extern void net_reset(
The text was updated successfully, but these errors were encountered:
Agreed. Can you create a pull request for me?
Sorry, something went wrong.
Done, but I cannot create the second fork of the same repo. On copied branch it looks like below master...yvs2014:mtr085:mtr20230425-unspecaddr
No branches or pull requests
Hello,
accidentally spotted in current version
non-gtk part probably can be fixed with
The text was updated successfully, but these errors were encountered: