traviscross / mtr

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

Fix changing source #393

Closed rpaaron closed 3 years ago

rpaaron commented 3 years ago

Fixes https://github.com/traviscross/mtr/issues/378

I moved the "starting a new traceroute" part of net_reopen to it single caller in gtk.c Then moved the common parts of net_open to net_reopen including the initialisation of the source addresses, and now call net_reopen from net_open

rewolff commented 3 years ago

Yeah.... work needs to be done to be able to switch address families, right?

robert-scheck commented 3 years ago

Exactly!

rewolff commented 3 years ago

The annoying thing is that starting without a target and then specifying the target in the gui is a way to work with mtr, but if it chooses the AF wrong with the default target that would be annoying.

robert-scheck commented 3 years ago

No default target/destination leads to AF_INET6 on most systems, because localhost resolves to ::1. But as the GUI allows to switch the target/destination (while the TUI doesn't), the address family needs to be re-evaluated with each target/destination change.