Commit Graph

750 Commits

Author SHA1 Message Date
R.E. Wolff
5646356950 merged 2023-04-22 19:14:02 +02:00
Roger Wolff
a1548b40c0
Merge pull request #468 from msmeissn/master
fixed the sizes passed into snprintf
2023-04-11 17:17:13 +02:00
Marcus Meissner
5908af4c19 fixed the sizes passed into snprintf 2023-04-11 16:05:36 +02:00
Roger Wolff
56fe6c435f
Merge pull request #462 from uniontech-lilinjie/master
fix typo
2023-01-10 11:11:49 +01:00
lilinjie
b7a6df88fd fix typo
Signed-off-by: lilinjie <lilinjie@uniontech.com>
2023-01-10 14:20:12 +08:00
R.E. Wolff
4f6d0e7c35 Markus pointed out useless statement. 2022-09-30 09:42:20 +02:00
Roger Wolff
826ffa9595
Merge pull request #447 from kerolasa/exit-code
ui: make interactive and non-interactive exit code the same
2022-09-06 16:07:17 +02:00
Sami Kerola
d2a29fffb4
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>
2022-09-06 14:40:12 +01:00
Roger Wolff
ef5c161cee
Merge pull request #426 from amarshall/min-port
Adjust MIN_PORT to comply with IANA reserved/recommended ports
2022-08-19 10:48:36 +02:00
Roger Wolff
bc50b514e3
Merge pull request #445 from wenlxie/addhelpforECMP
Add help info for option -E
2022-08-19 10:46:40 +02:00
wenlxie
2b9c090d2d Add help info for option -E 2022-08-19 16:34:22 +08:00
Roger Wolff
a7f9224be6
Merge pull request #443 from rovo89/bindtodevice
Check if SO_BINDTODEVICE is defined
2022-08-10 13:27:35 +02:00
Robert Vollmer
a2bd14115c Check if SO_BINDTODEVICE is defined 2022-08-10 11:19:41 +02:00
Roger Wolff
602d48fa98
Merge pull request #440 from rovo89/bindtodevice
Set SO_BINDTODEVICE for `-I`
2022-08-05 13:03:41 +02:00
Robert Vollmer
7a0320038a 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.
2022-08-05 09:58:41 +02:00
Roger Wolff
327dd3f074
Merge pull request #412 from 23hiro/master
ipv6 udp checksums like ipv4 but with ipv6 pseudoheader
2022-07-17 14:46:56 +02:00
23hiro
24dbdb2c00
Merge branch 'traviscross:master' into master 2022-07-17 11:49:44 +00:00
Roger Wolff
0886eee5ba
Merge pull request #430 from bewing/max_display_path
add --max-display-paths option
2022-05-14 18:15:49 +02:00
Brandon Ewing
7b4153a3d2 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
2022-05-14 11:09:08 -05:00
Roger Wolff
c8bd995785
Merge pull request #429 from bewing/ecmp_order
use addrs for static host ordering in curses
2022-05-14 12:06:06 +02:00
Brandon Ewing
5beecb8cc4 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.
2022-05-13 10:27:55 -05:00
Andrew Marshall
e95eaf4715 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.
2022-03-23 12:14:36 -04:00
R.E. Wolff
852e5617fb The release script bumped the version number to 95 2022-01-11 10:10:34 +01:00
R.E. Wolff
e97049c703 increased max length suggested by YVS2014 2021-12-22 23:58:23 +01:00
Roger Wolff
630d2fea11
Merge pull request #416 from gmax0/master
Report secondary servers when CSV + wide report is enabled
2021-12-14 08:16:03 +01:00
gaamox@tutanota.com
ee3559161b Report secondary servers when CSV + wide report is enabled 2021-12-13 22:34:22 -08:00
hiro
d6171b8df9 ipv6 udp checksums like ipv4 but with ipv6 pseudoheader
this fixes a problem where both source and destination port are supplied on the commandline,
this lead to packets not showing up any more due to checksum being different.
this was mentioned first on https://github.com/traviscross/mtr/issues/351
2021-11-09 17:50:12 +00:00
Roger Wolff
3f80a21753
Merge pull request #411 from trofi/master
ui/curses: always use "%s"-style format for printf()-style functions
2021-11-01 08:50:49 +01:00
Sergei Trofimovich
aeb493e08e ui/curses: always use "%s"-style format for printf()-style functions
`ncuses-6.3` added printf-style function attributes and now makes
it easier to catch cases when user input is used in palce of format
string when built with CFLAGS=-Werror=format-security:

  ui/curses.c:765:42:
    error: format not a string literal and no format arguments [-Werror=format-security]
    765 |         mvprintw(rowstat - 1, startstat, msg);
        |                                          ^~~

Let's wrap all the missing places with "%s" format.
2021-11-01 07:36:06 +00:00
Roger Wolff
ec42ba61f7
Merge pull request #407 from a1346054/fixes
Minor cleanup
2021-09-05 17:51:16 +02:00
a1346054
c8ddefe816 trim trailing whitespace 2021-09-05 13:56:32 +00:00
a1346054
001ea8a190 fix spelling 2021-09-05 13:56:32 +00:00
a1346054
1d80fd0f1d unify codestyle 2021-09-05 13:56:32 +00:00
a1346054
2e837dee7c fix shellcheck warnings 2021-09-05 13:45:04 +00:00
a1346054
8089904ca6 fix wrong bash completion flag 2021-09-05 13:45:02 +00:00
Roger Wolff
dca7750f19
Merge pull request #399 from krisl/bits_and_pieces
dont show json option if not available
2021-04-17 08:39:18 +02:00
Aaron Lipinski
9627572d43 dont show json option if not available 2021-04-17 08:36:55 +12:00
Roger Wolff
a7342019a5
Merge pull request #397 from rpaaron/consistent_resolution_strategy
Consistent resolution strategy
2021-04-09 08:55:46 +02:00
Aaron Lipinski
9e01af2ac2 rename function 2021-04-09 08:36:25 +12:00
Aaron Lipinski
a351f65053 make Hostname as const 2021-04-09 08:36:25 +12:00
Aaron Lipinski
6521dc4fb0 export get_hostent_from_name 2021-04-09 08:36:25 +12:00
Aaron Lipinski
e956e55621 freeaddrinfo 2021-04-09 08:36:25 +12:00
Aaron Lipinski
fd29a7e630 reset addr family before searching again 2021-04-09 08:36:25 +12:00
Aaron Lipinski
cf1b9bc7e7 export DEFAULT_AF 2021-04-09 08:36:25 +12:00
Aaron Lipinski
6a8471e48d switch gui to addrinfo 2021-04-09 08:36:25 +12:00
Aaron Lipinski
5a45ca9cc2 remove conversion function 2021-04-09 08:36:25 +12:00
Aaron Lipinski
6e2e4674a3 use addrinfo 2021-04-09 08:36:25 +12:00
Aaron Lipinski
5fd5c2b59d move conversion call to caller 2021-04-09 08:36:25 +12:00
Aaron Lipinski
b1f0f03a3a extract convert_addrinfo_to_hostent function 2021-04-09 08:36:25 +12:00
Aaron Lipinski
92569b381b remove temporaries 2021-04-09 08:36:25 +12:00