]> git.ipfire.org Git - thirdparty/mtr.git/log
thirdparty/mtr.git
2 weeks agoMerge pull request #540 from sevan/darwin-buildfix master
Roger Wolff [Sun, 13 Jul 2025 15:15:40 +0000 (17:15 +0200)] 
Merge pull request #540 from sevan/darwin-buildfix

Legacy IOS system build fix.

2 weeks agopacket/construct_unix.c: Only set IPV6_TCLASS if defined. 540/head
Sevan Janiyan [Sat, 12 Jul 2025 18:13:51 +0000 (19:13 +0100)] 
packet/construct_unix.c: Only set IPV6_TCLASS if defined.

Resolves build on legacy systems with IPv6 stacks which lack RFC 3542
support e.g Mac OS X, before 10.6.

2 weeks agopacket/construct_unix.c: unused variable
Sevan Janiyan [Sat, 12 Jul 2025 18:12:44 +0000 (19:12 +0100)] 
packet/construct_unix.c: unused variable

2 weeks agoui/asn.c: No need to define BIND_8_COMPAT
Sevan Janiyan [Sat, 12 Jul 2025 18:06:39 +0000 (19:06 +0100)] 
ui/asn.c: No need to define BIND_8_COMPAT

Before OS X 10.6, defining BIND_8_COMPAT included arpa/nameser8_compat.h
which was removed in 10.6 and from then on included arpa/nameser_compat.h
until BIND_8_COMPAT was removed somewhere between macOS 10.13 & 10.15.

On systems before 10.6 this causes the build to break due to conflicts.

3 weeks agoMerge pull request #538 from Plutor/master
Roger Wolff [Wed, 9 Jul 2025 14:53:35 +0000 (16:53 +0200)] 
Merge pull request #538 from Plutor/master

Raw pings output time in usec. Correct args and docs.

3 weeks agoRaw pings output time in usec. Correct args and docs. 538/head
Logan Ingalls [Wed, 9 Jul 2025 14:33:08 +0000 (10:33 -0400)] 
Raw pings output time in usec. Correct args and docs.

(An alternate solution is to correct https://github.com/traviscross/mtr/blob/master/ui/net.c#L319, but that would potentially break workflows for users, so this is likely a more acceptable fix)

3 weeks agoAdded backticks around host. Fixes #536
R.E. Wolff [Sun, 6 Jul 2025 20:03:57 +0000 (22:03 +0200)] 
Added backticks around host. Fixes #536

3 weeks agoThe release script bumped the version number to 96 v0.96
R.E. Wolff [Sun, 6 Jul 2025 15:36:42 +0000 (17:36 +0200)] 
The release script bumped the version number to 96

3 weeks agoAdded Arad Cohen to NEWS
R.E. Wolff [Sun, 6 Jul 2025 15:26:00 +0000 (17:26 +0200)] 
Added Arad Cohen to NEWS

4 weeks agoMerge branch 'master' of github.com:traviscross/mtr
R.E. Wolff [Sun, 29 Jun 2025 12:06:08 +0000 (14:06 +0200)] 
Merge branch 'master' of github.com:traviscross/mtr

4 weeks agoAdded protection against use of MTR_PACKET under special circumstances
R.E. Wolff [Sun, 29 Jun 2025 12:06:00 +0000 (14:06 +0200)] 
Added protection against use of MTR_PACKET under special circumstances

6 weeks agoMerge pull request #534 from jlu5/fix/addrcmp-af-unspec
Roger Wolff [Sat, 14 Jun 2025 18:21:54 +0000 (20:21 +0200)] 
Merge pull request #534 from jlu5/fix/addrcmp-af-unspec

net: implement addrcmp for AF_UNSPEC

6 weeks agoMerge pull request #535 from jlu5/fix/split-mode-init
Roger Wolff [Sat, 14 Jun 2025 10:45:38 +0000 (12:45 +0200)] 
Merge pull request #535 from jlu5/fix/split-mode-init

Initialize lines to empty string in split mode

6 weeks agoInitialize lines to empty string in split mode 535/head
James Lu [Sat, 14 Jun 2025 02:59:56 +0000 (19:59 -0700)] 
Initialize lines to empty string in split mode

Split mode only prints lines that have changed, so initializing them to "???" means that unknown / hidden hops are never printed.

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

6 weeks agonet: implement addrcmp for AF_UNSPEC 534/head
James Lu [Sat, 14 Jun 2025 02:06:21 +0000 (19:06 -0700)] 
net: implement addrcmp for AF_UNSPEC

When mtr is compiled with IPv6 enabled, the GTK frontend sets the address family to AF_UNSPEC when changing destinations. However, addrcomp does not support this AF type, which causes all comparisons to not match. For the GTK frontend, this leads to a cascading failure when setting the destination to a host that does not resolve:

1. Upon setting ctl->af = AF_UNSPEC, net_max() will report that all hops have data, as no hops can match the previous remote address.
2. The GTK frontend tries to render a row for every hop, including its IP / hostname.
3. The guard in the GTK frontend to avoid looking up unknown addresses also fails, causing mtr to flood DNS packets and effectively hang.

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

3 months agoMerge pull request #531 from marek22k/xmlencoding
Roger Wolff [Wed, 23 Apr 2025 17:41:07 +0000 (19:41 +0200)] 
Merge pull request #531 from marek22k/xmlencoding

Set UTF-8 encoding for XML reports

3 months agoIncreased max probes
R.E. Wolff [Fri, 18 Apr 2025 07:47:55 +0000 (09:47 +0200)] 
Increased max probes

3 months agoMerge pull request #530 from bartman/bart/mtr-braille-graph
Roger Wolff [Mon, 14 Apr 2025 17:43:52 +0000 (19:43 +0200)] 
Merge pull request #530 from bartman/bart/mtr-braille-graph

mtr braille graph support

3 months agoSet UTF-8 encoding for XML reports 531/head
Marek Küthe [Sun, 13 Apr 2025 11:58:08 +0000 (11:58 +0000)] 
Set UTF-8 encoding for XML reports

3 months agofix documentation/comment for ENABLE_BRAILLE 530/head
Bart Trojanowski [Sat, 12 Apr 2025 16:36:37 +0000 (12:36 -0400)] 
fix documentation/comment for ENABLE_BRAILLE

3 months agofix legend for braille display
Bart Trojanowski [Wed, 9 Apr 2025 20:45:45 +0000 (16:45 -0400)] 
fix legend for braille display

3 months agoadd braille graph support with --displaymode 3
Bart Trojanowski [Tue, 8 Apr 2025 03:11:09 +0000 (23:11 -0400)] 
add braille graph support with --displaymode 3

5 months agoMerge pull request #527 from marek22k/fix-475
Roger Wolff [Mon, 17 Feb 2025 18:45:02 +0000 (19:45 +0100)] 
Merge pull request #527 from marek22k/fix-475

Fix https://github.com/traviscross/mtr/issues/475

5 months agoMerge pull request #528 from marek22k/fix-522-2
Roger Wolff [Sun, 16 Feb 2025 12:07:23 +0000 (13:07 +0100)] 
Merge pull request #528 from marek22k/fix-522-2

xml report: remove leading spaces

5 months agoxml report: remove leading spaces 528/head
Marek Küthe [Fri, 14 Feb 2025 23:14:24 +0000 (23:14 +0000)] 
xml report: remove leading spaces

5 months agoFix https://github.com/traviscross/mtr/issues/475 527/head
Marek Küthe [Sat, 15 Feb 2025 22:21:13 +0000 (22:21 +0000)] 
Fix https://github.com/traviscross/mtr/issues/475

With an input of `-28` the expression `(-ctl->cpacketsize - MINPACKET)` became 0, which triggered a zero division. This error is fixed by introducing a check to see if there is any room for randomness. Furthermore, a check of the input arguments in the command line and in curses is performed.

5 months agoMerge pull request #526 from marek22k/fix-523-2
Roger Wolff [Sat, 15 Feb 2025 21:53:45 +0000 (22:53 +0100)] 
Merge pull request #526 from marek22k/fix-523-2

Remove redundant code

5 months agoRemove redundant code 526/head
Marek Küthe [Sat, 15 Feb 2025 21:35:41 +0000 (21:35 +0000)] 
Remove redundant code

As @yvs2014 noted in https://github.com/traviscross/mtr/issues/523#issuecomment-2660970185, it is unnecessary to check whether an int is larger than the maximum int value. An int cannot be greater than the maximum int value.

5 months agoMerge pull request #525 from marek22k/fix-523
Roger Wolff [Sat, 15 Feb 2025 20:43:13 +0000 (21:43 +0100)] 
Merge pull request #525 from marek22k/fix-523

Fix 523

5 months agoSplit the strtonum function into two parts to create a better structure 525/head
Marek Küthe [Fri, 14 Feb 2025 23:31:18 +0000 (23:31 +0000)] 
Split the strtonum function into two parts to create a better structure

This even saves some memory when converting signed integers, as no `long` is used.

5 months agoAllow signed integers in the utils function
Marek Küthe [Fri, 14 Feb 2025 23:28:27 +0000 (23:28 +0000)] 
Allow signed integers in the utils function

Fix https://github.com/traviscross/mtr/issues/523

5 months agoChanged how conflicitng first/max TTL works.
R.E. Wolff [Wed, 5 Feb 2025 12:34:05 +0000 (13:34 +0100)] 
Changed how conflicitng first/max TTL works.

11 months agoMerge pull request #515 from msekletar/icmp-socket-leak
Roger Wolff [Tue, 27 Aug 2024 17:12:57 +0000 (19:12 +0200)] 
Merge pull request #515 from msekletar/icmp-socket-leak

Prevent icmp_socket leak on error

11 months agoPrevent icmp_socket leak on error 515/head
Michal Sekletar [Tue, 27 Aug 2024 15:59:15 +0000 (17:59 +0200)] 
Prevent icmp_socket leak on error

11 months agoMerge pull request #513 from arekm/master
Roger Wolff [Wed, 21 Aug 2024 11:16:32 +0000 (13:16 +0200)] 
Merge pull request #513 from arekm/master

Handle EHOSTDOWN and refine error handling better granularity

11 months agoHandle EHOSTDOWN and refine error handling better granularity 513/head
Arkadiusz Miśkiewicz [Wed, 21 Aug 2024 07:42:14 +0000 (09:42 +0200)] 
Handle EHOSTDOWN and refine error handling better granularity

11 months agoMerge pull request #512 from infrastation/fix_man_mtr
Roger Wolff [Thu, 15 Aug 2024 14:08:04 +0000 (16:08 +0200)] 
Merge pull request #512 from infrastation/fix_man_mtr

mtr.8.in: spell --mark argument type properly

11 months agomtr.8.in: spell --mark argument type properly 512/head
Denis Ovsienko [Thu, 15 Aug 2024 13:31:46 +0000 (14:31 +0100)] 
mtr.8.in: spell --mark argument type properly

[skip ci]

11 months agoMerge pull request #511 from verrens/compact-layout
Roger Wolff [Sat, 3 Aug 2024 16:57:28 +0000 (18:57 +0200)] 
Merge pull request #511 from verrens/compact-layout

Add a compact mode in curses

11 months agoMerge branch 'master' into compact-layout 511/head
verrens [Sat, 3 Aug 2024 16:29:29 +0000 (19:29 +0300)] 
Merge branch 'master' into compact-layout

11 months agoAdd a compact mode in curses
Denis Afonin [Sat, 3 Aug 2024 16:16:57 +0000 (19:16 +0300)] 
Add a compact mode in curses

12 months agoMerge pull request #509 from nuclearcat/tiny-typo
Roger Wolff [Mon, 8 Jul 2024 06:23:52 +0000 (08:23 +0200)] 
Merge pull request #509 from nuclearcat/tiny-typo

Fix tiny typo in target

12 months agoFix tiny typo in target 509/head
Denys Fedoryshchenko [Sun, 7 Jul 2024 22:00:46 +0000 (01:00 +0300)] 
Fix tiny typo in target

Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
21 months agoMerge pull request #495 from matt-kimball/cygwin-async-pipe 504/head
Roger Wolff [Tue, 24 Oct 2023 07:22:58 +0000 (09:22 +0200)] 
Merge pull request #495 from matt-kimball/cygwin-async-pipe

Update Cygwin ICMP service thread for asynchronous pipes

21 months agoUpdate Cygwin ICMP service thread for asynchronous pipes 495/head
Matt Kimball [Tue, 24 Oct 2023 02:02:43 +0000 (03:02 +0100)] 
Update Cygwin ICMP service thread for asynchronous pipes

Recent versions of Cygwin implement pipe() using Windows' named
pipes, and put the read end of the pipe in FILE_PIPE_COMPLETE_OPERATION
mode, which doesn't allow overlapped I/O operations.

For the relevant commit in the Cygwin repository, see
9e4d308cd592fe383dec58ea6523c1b436888ef8

The solution here is to maintain a Windows event object which is
set only when any ICMP requests are pending.  We can do an alertable
wait on that event object, which will allow us to complete ICMP
requests.

Thanks to Adam Schultz for research into this issue and a first
attempt at a fix.

21 months agoMerge pull request #493 from slord399/master
Roger Wolff [Sat, 14 Oct 2023 21:00:54 +0000 (23:00 +0200)] 
Merge pull request #493 from slord399/master

Recommend WSL as a way to run MTR on Windows.

21 months agoUpdate section title 493/head
Tony Lewis Hiroaki URAHAMA [Sat, 7 Oct 2023 20:20:42 +0000 (21:20 +0100)] 
Update section title

21 months agoAdd Ubuntu as specific distribution
Tony Lewis Hiroaki URAHAMA [Sat, 7 Oct 2023 20:05:19 +0000 (21:05 +0100)] 
Add Ubuntu as specific distribution

21 months agoAdd WSL method to Windows Install
Tony Lewis Hiroaki URAHAMA [Sat, 7 Oct 2023 19:58:59 +0000 (20:58 +0100)] 
Add WSL method to Windows Install

It would be much simpler and not experience IPv6 related build fail at all.

21 months agoMerge pull request #489 from flu0r1ne/set-mark-during-address-selection
Roger Wolff [Wed, 4 Oct 2023 09:28:08 +0000 (11:28 +0200)] 
Merge pull request #489 from flu0r1ne/set-mark-during-address-selection

Set mark during address selection

21 months agoSupport Hexadecimal Arguments for Packet Marking 489/head
flu0r1ne [Wed, 4 Oct 2023 03:45:20 +0000 (22:45 -0500)] 
Support Hexadecimal Arguments for Packet Marking

Packet marks are often specified in hexadecimal format. Update the
`strtonum_or_err` function to parse both hexadecimal and decimal
values.

21 months agoUse Packet Marking for IP Address Selection
flu0r1ne [Wed, 4 Oct 2023 03:31:23 +0000 (22:31 -0500)] 
Use Packet Marking for IP Address Selection

In certain scenarios, the routing policy database may affect packet
routing. When selecting an address in `mtr`, assign a packet mark if
`SO_MARK` is defined and a mark has been supplied.

21 months agoUse a uint32 for the type of a Linux mark
flu0r1ne [Wed, 4 Oct 2023 03:13:00 +0000 (22:13 -0500)] 
Use a uint32 for the type of a Linux mark

It is typical to store and manipulate Linux packet marks using unsigned values.

21 months agoMerge pull request #478 from esimest/master
Roger Wolff [Tue, 3 Oct 2023 12:00:59 +0000 (14:00 +0200)] 
Merge pull request #478 from esimest/master

Add error code ETIMEOUT(110) handle logic

21 months agoMerge pull request #488 from flu0r1ne/linux-tests
Roger Wolff [Tue, 3 Oct 2023 12:00:11 +0000 (14:00 +0200)] 
Merge pull request #488 from flu0r1ne/linux-tests

Linux-Only Interface, Marking, and IP Unit Tests

21 months agoMerge pull request #487 from flu0r1ne/adjust-capability-handling
Roger Wolff [Tue, 3 Oct 2023 07:19:23 +0000 (09:19 +0200)] 
Merge pull request #487 from flu0r1ne/adjust-capability-handling

Adjust capability handling

21 months agoChange B101->S101 to reflect flake8 488/head
flu0r1ne [Tue, 3 Oct 2023 02:21:53 +0000 (21:21 -0500)] 
Change B101->S101 to reflect flake8

21 months agoFix flake8 linting
flu0r1ne [Tue, 3 Oct 2023 01:57:51 +0000 (20:57 -0500)] 
Fix flake8 linting

- Remove unused imports
- Search for ip executables in known locations
- Fix f-string
- Ignore assert warnings

21 months agoDrop capabilities when `setsockopt` errors 487/head
flu0r1ne [Tue, 3 Oct 2023 01:16:28 +0000 (20:16 -0500)] 
Drop capabilities when `setsockopt` errors

Ensure that `set_privileged_socket_opt` drops capabilities even in the event
that `setsockopt` returns an error.

21 months agoAnnotate `set_privileged_socket_opt` with UNUSED
flu0r1ne [Mon, 2 Oct 2023 23:10:43 +0000 (18:10 -0500)] 
Annotate `set_privileged_socket_opt` with UNUSED

The `set_privileged_socket_opt` function is currently called only when
`SO_MARK` or `SO_BINDTODEVICE` are defined. On systems that do not support
either feature, `set_privileged_socket_opt` is expected to be unused. Adding
an annotation suppresses compiler warnings.

21 months agoLinux-Only Interface, Marking, and IP Unit Tests
flu0r1ne [Mon, 2 Oct 2023 08:53:16 +0000 (03:53 -0500)] 
Linux-Only Interface, Marking, and IP Unit Tests

This commit introduces three unit tests focused on interface binding,
packet marking, and IP source address spoofing/selection. Each of these
tests builds upon the original `MtrPacketTest` base class. To evaluate
these network-dependent features, the tests utilize an emulated network
environment. To enable this, a small network emulation library, `netem`,
has been developed specifically for this purpose. `Netem` allows for the
creation of arbitrary network configurations for testing and can reliably
set up and clean up virtual network environments on Linux systems. The only
dependencies are `iproute2` and `libc`, which are generally pre-installed
on most Linux hosts.

The commit adds three tests that are expected to fail:

1. Interface Binding: Evaluates the capability of `mtr-packet` to bind to
   a specific interface.
2. Packet Marking: Assesses the ability of `mtr-packet` to apply a Linux
   networking mark (fwmark).
3. Source Address Selection: Tests `mtr-packet`'s ability to spoof or bind
   to a specified source address.

22 months agoFix interface binding by retaining CAP_NET_RAW
flu0r1ne [Fri, 29 Sep 2023 21:28:19 +0000 (16:28 -0500)] 
Fix interface binding by retaining CAP_NET_RAW

This commit addresses an issue where mtr would fail with EPERM because setting the
SO_BINDTODEVICE socket option requires the CAP_NET_RAW capability.

Changes:

- Refactor the code to abstract setting privileged socket options. This
  includes a common interface for setting capabilities depending on the
  platform (with or without LIBCAP).

- Replace direct setsockopt calls with the new abstracted function for
  setting both SO_MARK and SO_BINDTODEVICE.

- Update capability management in `drop_excess_capabilities` to retain
  CAP_NET_RAW when needed.

22 months agoFix Capability Management, Retain CAP_NET_ADMIN
flu0r1ne [Fri, 29 Sep 2023 08:07:54 +0000 (03:07 -0500)] 
Fix Capability Management, Retain CAP_NET_ADMIN

Modify the capability-dropping logic to specifically retain CAP_NET_ADMIN if it
is initially provided, in adherence to least-privilege principles.

Details:
1. Update the `drop_excess_capabilities` function to only drop capabilities that
   are unnecessary, retaining CAP_NET_ADMIN when needed for setting the socket
   mark.
2. Introduce logic in `set_socket_mark` to temporarily elevate CAP_NET_ADMIN
   into the effective set for the duration of the packet mark setting
   operation.

22 months agoMerge pull request #484 from alarig/master
Roger Wolff [Mon, 11 Sep 2023 12:09:17 +0000 (14:09 +0200)] 
Merge pull request #484 from alarig/master

Change UDP and ICMP sockets binding to accept a source IP from the -a…

22 months agoChange UDP and ICMP sockets binding to accept a source IP from the -a CLI option 484/head
Alarig Le Lay [Mon, 11 Sep 2023 09:48:53 +0000 (11:48 +0200)] 
Change UDP and ICMP sockets binding to accept a source IP from the -a CLI option

Issue: #232

Signed-off-by: Alarig Le Lay <alarig@swordarmor.fr>
23 months agoMerge pull request #481 from darless/github-workflows
Roger Wolff [Thu, 10 Aug 2023 14:31:35 +0000 (16:31 +0200)] 
Merge pull request #481 from darless/github-workflows

Github actions added to perform lint and compile

2 years agoGithub actions added to perform lint and compile 481/head
darless [Tue, 11 Jul 2023 16:18:33 +0000 (11:18 -0500)] 
Github actions added to perform lint and compile

In the test folder, there was lint.sh, but I think flake8 is a better
tool.

Added a compile job for linux, this runs compilation as defined in
the README, runs a sample mtr and runs cmdparse.py test. Need
documentation on what other tests to run and whether to include the
testing in tox instead of running them individually.

Not adding in this PR support for cygwin or freebsd, as that will need
investigation on how to run.

Minor:
- Fixed a typo in configure.ac that used ---- vs -- for a flag option.

2 years agoAdd error code ETIMEOUT(110) handle logic 478/head
Jian Cheng [Thu, 8 Jun 2023 12:28:29 +0000 (20:28 +0800)] 
Add error code ETIMEOUT(110) handle logic

2 years agoMerge pull request #476 from ewpratten/nat64_asns
Roger Wolff [Wed, 31 May 2023 09:39:00 +0000 (11:39 +0200)] 
Merge pull request #476 from ewpratten/nat64_asns

Implement ASN lookups in well-known nat64 prefix

2 years agoImplement ASN lookups in well-known nat64 prefix 476/head
Evan Pratten [Wed, 31 May 2023 00:22:48 +0000 (20:22 -0400)] 
Implement ASN lookups in well-known nat64 prefix

2 years agoFixed typo noted by @szczot3k
R.E. Wolff [Tue, 16 May 2023 12:03:37 +0000 (14:03 +0200)] 
Fixed typo noted by @szczot3k

2 years agoMerge branch 'master' of github.com:traviscross/mtr
R.E. Wolff [Tue, 16 May 2023 11:58:23 +0000 (13:58 +0200)] 
Merge branch 'master' of github.com:traviscross/mtr

2 years agoMerge pull request #473 from famfo/master
Roger Wolff [Tue, 16 May 2023 11:13:54 +0000 (13:13 +0200)] 
Merge pull request #473 from famfo/master

Add option to use custom ipinfo provider

2 years agoAdd option to use custom ipinfo provider 473/head
famfo [Tue, 16 May 2023 10:41:58 +0000 (12:41 +0200)] 
Add option to use custom ipinfo provider

2 years agoMerge pull request #472 from the-eater/fix-cap
Roger Wolff [Tue, 16 May 2023 07:33:32 +0000 (09:33 +0200)] 
Merge pull request #472 from the-eater/fix-cap

configure.ac: fix broken cap check

2 years agoconfigure.ac: fix broken cap check 472/head
eater [Tue, 16 May 2023 04:40:24 +0000 (04:40 +0000)] 
configure.ac: fix broken cap check

2 years agomerged
R.E. Wolff [Sat, 22 Apr 2023 17:14:02 +0000 (19:14 +0200)] 
merged

2 years agoMerge pull request #468 from msmeissn/master
Roger Wolff [Tue, 11 Apr 2023 15:17:13 +0000 (17:17 +0200)] 
Merge pull request #468 from msmeissn/master

fixed the sizes passed into snprintf

2 years agofixed the sizes passed into snprintf 468/head
Marcus Meissner [Tue, 11 Apr 2023 14:05:36 +0000 (16:05 +0200)] 
fixed the sizes passed into snprintf

2 years agoMerge pull request #462 from uniontech-lilinjie/master
Roger Wolff [Tue, 10 Jan 2023 10:11:49 +0000 (11:11 +0100)] 
Merge pull request #462 from uniontech-lilinjie/master

fix typo

2 years agofix typo 462/head
lilinjie [Tue, 10 Jan 2023 06:20:12 +0000 (14:20 +0800)] 
fix typo

Signed-off-by: lilinjie <lilinjie@uniontech.com>
2 years agoMarkus pointed out useless statement.
R.E. Wolff [Fri, 30 Sep 2022 07:42:20 +0000 (09:42 +0200)] 
Markus pointed out useless statement.

2 years agoMerge pull request #447 from kerolasa/exit-code
Roger Wolff [Tue, 6 Sep 2022 14:07:17 +0000 (16:07 +0200)] 
Merge pull request #447 from kerolasa/exit-code

ui: make interactive and non-interactive exit code the same

2 years agoui: make interactive and non-interactive exit code the same 447/head
Sami Kerola [Tue, 6 Sep 2022 13:16:04 +0000 (14:16 +0100)] 
ui: make interactive and non-interactive exit code the same

Before this change the report gave successful exit value when destination
hostname could not be found.

    $ ./mtr --report nxdomain. ; echo $?
    ./mtr: Failed to resolve host: nxdomain.: Name or service not known
    0

Quickly looking 'git grep ---after-context if.*Interactive' there does not
appear to be more than the two instances in main() where exit is called
depending on interactive, so this change should cover all these cases.

Reported-by: Marek Kroemeke <mkroemeke@cloudflare.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2 years agoMerge pull request #426 from amarshall/min-port
Roger Wolff [Fri, 19 Aug 2022 08:48:36 +0000 (10:48 +0200)] 
Merge pull request #426 from amarshall/min-port

Adjust MIN_PORT to comply with IANA reserved/recommended ports

2 years agoMerge pull request #445 from wenlxie/addhelpforECMP
Roger Wolff [Fri, 19 Aug 2022 08:46:40 +0000 (10:46 +0200)] 
Merge pull request #445 from wenlxie/addhelpforECMP

Add help info for option -E

2 years agoAdd help info for option -E 445/head
wenlxie [Fri, 19 Aug 2022 05:51:35 +0000 (13:51 +0800)] 
Add help info for option -E

2 years agoMerge pull request #443 from rovo89/bindtodevice
Roger Wolff [Wed, 10 Aug 2022 11:27:35 +0000 (13:27 +0200)] 
Merge pull request #443 from rovo89/bindtodevice

Check if SO_BINDTODEVICE is defined

2 years agoCheck if SO_BINDTODEVICE is defined 443/head
Robert Vollmer [Wed, 10 Aug 2022 09:15:55 +0000 (11:15 +0200)] 
Check if SO_BINDTODEVICE is defined

2 years agoMerge pull request #440 from rovo89/bindtodevice
Roger Wolff [Fri, 5 Aug 2022 11:03:41 +0000 (13:03 +0200)] 
Merge pull request #440 from rovo89/bindtodevice

Set SO_BINDTODEVICE for `-I`

2 years agoSet SO_BINDTODEVICE for -I 440/head
Robert Vollmer [Fri, 5 Aug 2022 07:58:41 +0000 (09:58 +0200)] 
Set SO_BINDTODEVICE for -I

This is done by traceroute and other tools as well. It requires
CAP_NET_RAW, but without it the -I option doesn't seem to have any
effect.

3 years agoMerge pull request #412 from 23hiro/master
Roger Wolff [Sun, 17 Jul 2022 12:46:56 +0000 (14:46 +0200)] 
Merge pull request #412 from 23hiro/master

ipv6 udp checksums like ipv4 but with ipv6 pseudoheader

3 years agoMerge branch 'traviscross:master' into master 412/head
23hiro [Sun, 17 Jul 2022 11:49:44 +0000 (11:49 +0000)] 
Merge branch 'traviscross:master' into master

3 years agoMerge pull request #430 from bewing/max_display_path
Roger Wolff [Sat, 14 May 2022 16:15:49 +0000 (18:15 +0200)] 
Merge pull request #430 from bewing/max_display_path

add --max-display-paths option

3 years agoadd --max-display-paths option 430/head
Brandon Ewing [Fri, 13 May 2022 16:18:38 +0000 (11:18 -0500)] 
add --max-display-paths option

It is not unknown to have datacenters with over 8 ECMP paths between two
hops.  Expand the maximum number of ECMP hosts stored in addrs to 128,
and add a new option to control the number to display, defaulting to the
old MAX_PATHS of 8

3 years agoMerge pull request #429 from bewing/ecmp_order
Roger Wolff [Sat, 14 May 2022 10:06:06 +0000 (12:06 +0200)] 
Merge pull request #429 from bewing/ecmp_order

use addrs for static host ordering in curses

3 years agouse addrs for static host ordering in curses 429/head
Brandon Ewing [Fri, 13 May 2022 15:27:55 +0000 (10:27 -0500)] 
use addrs for static host ordering in curses

Change d2552ca has the side effect of moving hosts around in the
multipath view, as the last host to reply to a packet was set as
addr.  Using addrs[0] istead of addr to draw the first host keeps
the ordering deterministic, in order of first reply.

3 years agoAdjust MIN_PORT to match other implementations 426/head
Andrew Marshall [Wed, 23 Mar 2022 15:36:48 +0000 (11:36 -0400)] 
Adjust MIN_PORT to match other implementations

Port 33434 is the IANA-reserved port for traceroute. It also seems to be
the most common start port. The following implementations, and
likely others, use it as their start port:

- Apple macOS traceroute
- FreeBSD traceroute
- GNU inetutils-traceroute
- Modern traceroute for Linux
- OpenBSD traceroute

The benefit to using a standard starting port is that some firewalls may
have these ports allowed, whereas other ports may be blocked, so there
is a greater probability the probe will succeed.

3 years agoThe release script bumped the version number to 95 v0.95
R.E. Wolff [Tue, 11 Jan 2022 09:10:34 +0000 (10:10 +0100)] 
The release script bumped the version number to 95

3 years agoincreased max length suggested by YVS2014
R.E. Wolff [Wed, 22 Dec 2021 22:58:23 +0000 (23:58 +0100)] 
increased max length suggested by YVS2014