On Thu, Oct 03, 2013 at 06:07:42AM -0300, Rogério Brito wrote: > It is a common method, indeed. I don't know how/why mtr uses a > pseudo-random generator, though, without having read the code (will > read that later, if I still have sufficient interest).
mtr sends out (crafted, non-regular) packets and looks at what comes back as error messages. At some point in the past, close to the start of the development of IP (i.e. 1980ies), someone made a mistake that makes it difficult to determine WHAT packet the returned error corresponds to. So we have to trick things a bit to make sure that we associate the response with the correct probe. If we use a deterministic (e.g. next = cur+1) method, two mtr's running on the same machine starting out with similar "seeds" (the first "cur") will continue to recieve eachother's responses. By using a pseudorandom sequence they might occasionally match a response to the other mtr to something they sent themselves. But that is very rare. (I think we have about 15 or 16 bits, so 20 (average # of hops)/30000 might be a good guess). > > If that works, it's a bug that has been fixed in the main codebase: > > either work around it by supplying a hostname, or upgrade if you want. > > Yes, passing an argument works fine. Perhaps we need the newest version of > mtr packaged in Debian... I haven't released the "next" version yet. I think Robert is up-to-date with the latest release. This is first on my platter... (next = 0.86, I should have a script that just makes a release, but that script isn't perfect yet, and needs some hours of debugging which I can only do when I actually have a release to do AND have the time to debug the script) > > (I personally think the default of "localhost" is untidy: cleanlyness > > would require mtr to say: "no host to trace provided. Bye!" (or just > > exit wihtout doing anything as it does in your case). However that > > means that starting mtr from a menu in a gui without arguments would > > make it close immediately.) > I don't really think that it is *that* unclean of a solution. OTOH, > just quitting without any message violates the spirit of Unix of > being noisy when errors occur, while being silent when everything is > fine. It isn't an error: You specified nothing to do, so I do nothing. But agreed, rm without arguments also considers this an error. On the other hand, in C: for (i=0;i<n;i++) { ... } will run the loop once with n=1, and silently no times at all when you specify n=0. (which in fact is close to what happened inside mtr without arguments). > If mtr issued a message that I missed an argument, then I would not have > sent this bugreport in the first place. :) Agreed. But the "default is localhost" is a very old feature. It was intended to keep on working. Some feature (multiple hosts) was added that broke this. noone has wanted to change the old default behaviour. > Oh, I have a feature request: can you put a button to toggle the name > resolution in the GUI. :) This way, if name resolution is getting in the > way, then we can turn it off (or on) very easily. Yes. that'd be nice. Could you paste that into a feature request at https://launchpad.net/mtr/+bugs Roger. -- ** r.e.wo...@bitwizard.nl ** http://www.BitWizard.nl/ ** +31-15-2600998 ** ** Delftechpark 26 2628 XH Delft, The Netherlands. KVK: 27239233 ** *-- BitWizard writes Linux device drivers for any device you may have! --* The plan was simple, like my brother-in-law Phil. But unlike Phil, this plan just might work. -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org