]>
git.ipfire.org Git - thirdparty/mtr.git/log
aquerubin [Thu, 18 Aug 2016 14:24:54 +0000 (04:24 -1000)]
Fix standard deviation calculation.
R.E. Wolff [Thu, 18 Aug 2016 11:32:10 +0000 (13:32 +0200)]
Partial reverse of
6bb5b6b3b .
The bug in automake does not create a vulnerable distirbution. It
allows local attackers that are logged in (or running in the
background) when a distributer types "make distcheck" to possibly gain
root access on the build system. This is NOT creating a vulnerable
distribution. The fact that automake has a vulnerability does not
warrant build failures on older systems.
R.E. Wolff [Thu, 18 Aug 2016 07:25:44 +0000 (09:25 +0200)]
more cleanup
rewolff [Thu, 18 Aug 2016 06:14:57 +0000 (08:14 +0200)]
Merge pull request #138 from kerolasa/2016-08-17
2016 08 17 regression fixes and warnings removal
Sami Kerola [Wed, 17 Aug 2016 21:51:44 +0000 (22:51 +0100)]
warnings: fix --disable-ipv6 --without-ipinfo compilation warnings
Add include <strings.h> to avoid implicit declaration of built-in functions,
replace bzero() with memset(), mark function argument unused, and use %zu to
print size_t data type.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Sami Kerola [Wed, 17 Aug 2016 21:39:52 +0000 (22:39 +0100)]
build-sys: fix ./configure --disable-ipv6
Sami Kerola [Wed, 17 Aug 2016 20:34:59 +0000 (21:34 +0100)]
build-sys: fix --without-ipinfo regressions
The commit
e2d898cc16398609821f7a786ae86dcbac4884af was far from perfect it
broke all --without features. Oh dear me.
Looks like I am not the only one breaking configure. The --disable-ipv6 has
been broken since commit
d90dd1fd8f9289fa9e880c006ca6dff0ef7d4918 and
further damaged by
2cf22b240958b72fb8d84f3ee663f84cbad2c65b . These issues
will be addressed later.
Sami Kerola [Wed, 17 Aug 2016 19:52:02 +0000 (20:52 +0100)]
warnigns: add void to functions that do not take any arguments
The use of function declarators with empty parentheses (not prototype-format
parameter type declarators) is an obsolescent feature.
R.E. Wolff [Wed, 17 Aug 2016 11:59:36 +0000 (13:59 +0200)]
fixed no-gtk build bug introduced with
e2d898cc
R.E. Wolff [Wed, 17 Aug 2016 07:14:55 +0000 (09:14 +0200)]
Merge branch 'master' of github.com:traviscross/mtr
rewolff [Wed, 17 Aug 2016 07:14:46 +0000 (09:14 +0200)]
Merge pull request #136 from kerolasa/2016-08-16
2016 08 16 make build system better
Sami Kerola [Tue, 16 Aug 2016 12:40:19 +0000 (13:40 +0100)]
cleanup: remove unnecessary function
Sami Kerola [Tue, 16 Aug 2016 12:14:11 +0000 (13:14 +0100)]
readability: always use EXIT_* definitions from stdlib.h
Sami Kerola [Tue, 16 Aug 2016 11:56:08 +0000 (12:56 +0100)]
warnings: fix unused variable when ./configure --without-gtk is used
Use of preprocessor to enable/disable code blocks makes messy code. Perhaps
something can be done in future to make this nicer.
Sami Kerola [Tue, 16 Aug 2016 11:51:21 +0000 (12:51 +0100)]
build-sys: require automake 1.11.6 or newer
Do not let anyone to create vulnerable dist package.
Reference: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2012-3386
Sami Kerola [Tue, 16 Aug 2016 10:02:43 +0000 (11:02 +0100)]
build-sys: improve configure.am
Unify indentation, use strict quoting, and use appropriate macros. Add few
comments that can be found from ./configure script so that one has some idea
what macros are generating the lines one is looking.
Sami Kerola [Tue, 16 Aug 2016 09:34:01 +0000 (10:34 +0100)]
build-sys: use build version script from gnulib
This makes distribution tar-balls from snapshot to indicate they are
snapshot versions. Additionally the version markup ends up in config.h
correct way, so earlier code that was specific to this project can be
removed.
Reference: http://git.savannah.gnu.org/cgit/gnulib.git/tree/build-aux/git-version-gen
Sami Kerola [Tue, 16 Aug 2016 08:13:34 +0000 (09:13 +0100)]
build-sys: remove old dist Makefile kludge
Autotools dist works, there is no longer need for this.
Sami Kerola [Tue, 16 Aug 2016 07:15:22 +0000 (08:15 +0100)]
build-sys: fix make distcheck
New distribution package can, and should, now be built using 'make
distcheck' facility from autotools. Personally I would run the following.
git clean -xdf && git reset --hard HEAD &&
./bootstrap.sh && ./configure && make distcheck
Sami Kerola [Tue, 16 Aug 2016 06:36:31 +0000 (07:36 +0100)]
warnings: remove dead code
These functions are not used, remove them.
Sami Kerola [Tue, 16 Aug 2016 09:06:46 +0000 (10:06 +0100)]
cast: do not downgrade to float when double should be used
Regression from commit
78f019aa9d49be5ada89296a462939738c20c181
Requested-by: rewolff <R.E.Wolff@BitWizard.nl>
Reference: https://github.com/traviscross/mtr/pull/135/files#r74889063
Sami Kerola [Tue, 16 Aug 2016 09:01:23 +0000 (10:01 +0100)]
comment: add value range note to initialization
Requested-by: rewolff <R.E.Wolff@BitWizard.nl>
Reference: https://github.com/traviscross/mtr/pull/135#discussion_r74889440
Sami Kerola [Mon, 15 Aug 2016 20:38:39 +0000 (21:38 +0100)]
warnings: fix some missed unsigned vs signed variable comparisions
Commit
507092a9099a286f86639d9cd38dcdc1f28117ff fixed almost all of them,
this should be the last one.
rewolff [Tue, 16 Aug 2016 07:50:32 +0000 (09:50 +0200)]
Merge pull request #135 from kerolasa/warnings
Warnings branch
Sami Kerola [Mon, 15 Aug 2016 20:52:05 +0000 (21:52 +0100)]
warnings: multiply timeval seconds only when the value is small
It should be safe to multiply timeval seconds by million after substracting
sequence timestamp from now. The reason to postpone multiply operation is
to ensure there is smallest possible change for interger overflow to happen.
Sami Kerola [Mon, 15 Aug 2016 20:38:39 +0000 (21:38 +0100)]
warnings: fix couple unsigned vs signed variable comparisions
Sami Kerola [Mon, 15 Aug 2016 20:28:02 +0000 (21:28 +0100)]
warnings: mark unused function input variables
Sami Kerola [Mon, 15 Aug 2016 20:23:28 +0000 (21:23 +0100)]
warnings: do not take abs() when data type is unsigned
Taking the absolute value of unsigned type 'unsigned int' has no effect.
Sami Kerola [Mon, 15 Aug 2016 20:14:51 +0000 (21:14 +0100)]
build-sys: default to ,/configure --enable-silent-rules
This makes noticing compiler warnings easier.
Sami Kerola [Sun, 14 Aug 2016 21:48:09 +0000 (22:48 +0100)]
man: use url macro to urls and fix reference manual notations
Sami Kerola [Sun, 14 Aug 2016 21:05:03 +0000 (22:05 +0100)]
build-sys; do not use subdirectory object
None-recursive builds are quicker, and less problematic from make(1) object
tracking point of view. See reference for full explanation.
References: http://miller.emu.id.au/pmiller/books/rmch/
Sami Kerola [Sun, 14 Aug 2016 20:40:33 +0000 (21:40 +0100)]
cleanup: remove unnecessary null check
The fmt_ipinfo() returns variable from stack. In order a stack variable to
point to NULL there has to go so much things wrong that the program cannot
run - effectively this can happen when system memory is so low that even
global variables cannot be allocated.
Sami Kerola [Sun, 14 Aug 2016 20:28:11 +0000 (21:28 +0100)]
warnings: fix printf data types
Sami Kerola [Sun, 14 Aug 2016 20:21:45 +0000 (21:21 +0100)]
warnings: remove code that cannot be reached
Variable block_split gets value from static constants. It is impossible to
reach the true if-case, so remote the test can the code block.
Sami Kerola [Sun, 14 Aug 2016 20:19:27 +0000 (21:19 +0100)]
warnings: stop reassigning a value before the old one has been used
rewolff [Sun, 14 Aug 2016 21:41:19 +0000 (23:41 +0200)]
Merge pull request #134 from kerolasa/kerolasa
new usage() and few cleanups
Sami Kerola [Sun, 14 Aug 2016 19:52:47 +0000 (20:52 +0100)]
posix: replace bzero() and index() with modern equivelants
Replace bzero() with memset() and index() with strchr(). The earlier
functions are marked as legacy in posix.
Reference: http://pubs.opengroup.org/onlinepubs/
009695399 /functions/index.html
Reference: http://pubs.opengroup.org/onlinepubs/
009695399 /functions/bzero.html
Sami Kerola [Sun, 14 Aug 2016 19:28:20 +0000 (20:28 +0100)]
dns: remove unnecessary dns_events() function
No longer needed after
02a9e6193e5dec01198f7824b7ed92f320b4e7a9
Sami Kerola [Sun, 14 Aug 2016 19:11:36 +0000 (20:11 +0100)]
warnings: stop variable shadowing
Rename local variables not to conflict at following locations:
asn.c:160:26: warning: declaration of 'txtrec' shadows a global declaration [-Wshadow]
dns.c:351:50: warning: declaration of 'af' shadows a global declaration [-Wshadow]
dns.c:89:40: warning: declaration of 'af' shadows a global declaration [-Wshadow]
gtk.c:213:31: warning: declaration of 'Entry' shadows a global declaration [-Wshadow]
net.c:1408:31: warning: declaration of 'host' shadows a global declaration [-Wshadow]
net.c:1726:38: warning: declaration of 'af' shadows a global declaration [-Wshadow]
net.c:1744:39: warning: declaration of 'af' shadows a global declaration [-Wshadow]
net.c:876:7: warning: declaration of 'sequence' shadows a global declaration [-Wshadow]
Sami Kerola [Sun, 14 Aug 2016 10:31:28 +0000 (11:31 +0100)]
usage: add short and long options and descriptions to usage()
Earlier usage did not help users.
Sami Kerola [Sun, 14 Aug 2016 08:02:51 +0000 (09:02 +0100)]
warnings: remove unnecessary file
The hello.c was added in commit
de3d6bc16efea7e63910cce568498eed0e2cf45a
Rogier Wolff [Sat, 13 Aug 2016 10:50:38 +0000 (12:50 +0200)]
Fixed pull #133 another way....
R.E. Wolff [Tue, 9 Aug 2016 15:30:40 +0000 (17:30 +0200)]
increased default unknownhosts #92 #132 #130
(I give in).
R.E. Wolff [Tue, 9 Aug 2016 08:07:43 +0000 (10:07 +0200)]
format sent and rcvd fields correctly for big numbers #66
R.E. Wolff [Sat, 6 Aug 2016 12:11:21 +0000 (14:11 +0200)]
Updated NEWS as in v0.87.1
R.E. Wolff [Thu, 4 Aug 2016 11:09:24 +0000 (13:09 +0200)]
fixed double printout of start time, issue 131
R.E. Wolff [Wed, 3 Aug 2016 05:39:46 +0000 (07:39 +0200)]
Merge branch 'newdns'
R.E. Wolff [Wed, 3 Aug 2016 05:27:03 +0000 (07:27 +0200)]
The release script bumped the version number
R.E. Wolff [Tue, 2 Aug 2016 16:14:13 +0000 (18:14 +0200)]
issue 128: compile should be in .gitignore
rewolff [Mon, 1 Aug 2016 13:07:06 +0000 (15:07 +0200)]
Merge pull request #127 from nikolaik/json
Add support for JSON as report output format
Nikolai R Kristiansen [Fri, 29 Jul 2016 15:31:14 +0000 (17:31 +0200)]
Add support for JSON as report output format
This is based on the equivalent code for XML.
rewolff [Fri, 29 Jul 2016 07:13:11 +0000 (09:13 +0200)]
Merge pull request #126 from russor/master
add option to set graceperiod
russor [Fri, 29 Jul 2016 05:46:48 +0000 (22:46 -0700)]
add option to set graceperiod
useful when running a single probe on a network where many hops never
respond
rewolff [Thu, 21 Jul 2016 11:12:21 +0000 (13:12 +0200)]
Merge pull request #124 from aquerubin/master
Fix GTK display order. Update an email address in the GTK credits display.
rewolff [Thu, 21 Jul 2016 11:12:16 +0000 (13:12 +0200)]
Merge pull request #125 from aquerubin/newdns
Merge the GTK display order fix and credits update from master into newdns.
aquerubin [Thu, 21 Jul 2016 10:49:27 +0000 (00:49 -1000)]
Merge branch 'newdns' of https://github.com/aquerubin/mtr into newdns
aquerubin [Thu, 21 Jul 2016 10:46:08 +0000 (00:46 -1000)]
Merge branch 'master' into newdns
aquerubin [Thu, 21 Jul 2016 10:44:56 +0000 (00:44 -1000)]
Update Tony's email address in the GTK credits.
aquerubin [Thu, 21 Jul 2016 10:42:46 +0000 (00:42 -1000)]
Fix Avg and Best column order to match column headers in GTK display.
rewolff [Thu, 21 Jul 2016 06:01:26 +0000 (08:01 +0200)]
Merge pull request #123 from aquerubin/newdns
Sync up recent master updates into newdns
aquerubin [Wed, 20 Jul 2016 19:07:20 +0000 (09:07 -1000)]
Merge updates from branch 'master' into newdns
rewolff [Thu, 14 Jul 2016 14:58:18 +0000 (16:58 +0200)]
Merge pull request #122 from h-ume/gtk-aslookup
Add aslookup support to gtk interface
Hajimu UMEMOTO [Wed, 13 Jul 2016 16:52:02 +0000 (01:52 +0900)]
Add aslookup support to gtk interface
rewolff [Mon, 4 Jul 2016 10:37:22 +0000 (12:37 +0200)]
Merge pull request #120 from yupeng820921/master
add max-unknown option
penyu [Sun, 3 Jul 2016 20:12:01 +0000 (20:12 +0000)]
add max-unknown option
remove the MAX_UNKNOWN_HOSTS macro, use maxUnknown variable
instead of it, and add --max-unknown option, let it can be
configured at run time.
rewolff [Thu, 9 Jun 2016 21:42:49 +0000 (23:42 +0200)]
Merge pull request #118 from zorun/improve_ipinfo
Improve ipinfo
rewolff [Thu, 9 Jun 2016 21:37:46 +0000 (23:37 +0200)]
Merge pull request #119 from zorun/cosmetic
Cosmetic cleanup of the option-parsing code
Baptiste Jonglez [Thu, 9 Jun 2016 18:18:22 +0000 (19:18 +0100)]
Fix wrap-around bug when displaying IP info (-y option)
Some IP prefixes have an allocation date, but some don't.
For instance:
$ dig +short 49.60.231.80.origin.asn.cymru.com TXT
"6453 | 80.231.0.0/16 | EU | ripencc | 2002-03-20"
$ dig +short 186.83.219.195.origin.asn.cymru.com TXT
"6453 | 195.219.0.0/16 | EU | ripencc |"
In the latter case, the parsing code would miss the last (empty) field
and wrap around to the AS number, producing an inconsistent output
(see below).
While we're at it, also make the parsing logic easier to understand...
Before this patch:
$ mtr --report -y 4 nic.co.jp
Start: Thu Jun 9 19:13:50 2016
HOST: gilead Loss% Snt Last Avg Best Wrst StDev
1. 2004-04-05 gatwick.net.cl.ca 0.0% 10 2.0 4.7 2.0 7.1 1.9
2. 786 cl-wgb.route-west 0.0% 10 0.6 11.3 0.6 104.7 32.8
3. 786 d-we.c-ce.net.cam 0.0% 10 0.7 0.6 0.5 0.8 0.0
4. 786 c-ce.b-ec.net.cam 0.0% 10 0.7 6.9 0.3 52.6 16.2
5. 786 ae1.cambab-rbr1.e 0.0% 10 0.3 0.5 0.3 0.7 0.0
6. 786 146.97.65.118 0.0% 10 0.7 0.6 0.5 0.8 0.0
7. 786 146.97.38.17 0.0% 10 3.5 9.3 3.5 17.9 6.2
8. 786 ae29.londtn-sbr1. 0.0% 10 3.7 4.0 3.5 6.6 0.9
9. 2002-03-20 ix-ae-11-0.tcore1 0.0% 10 3.8 5.0 3.5 16.8 4.1
10. 6453 195.219.83.186 0.0% 10 4.3 4.4 3.9 5.6 0.3
11. 2914 ae-4.r22.londen03 0.0% 10 7.7 8.8 3.9 25.5 6.9
12. 2914 ae-6.r21.sngpsi05 0.0% 10 185.4 185.8 174.4 226.5 14.9
13. 2914 ae-20.r31.tokyjp0 0.0% 10 249.9 250.0 249.8 250.4 0.0
14. 2914 ae-21.r00.tokyjp0 0.0% 10 265.9 265.9 265.6 266.1 0.0
15. 2000-09-29 ae-0.gmo.tokyjp05 0.0% 10 253.7 252.5 244.7 257.5 4.4
16. ??? ??? 100.0 10 0.0 0.0 0.0 0.0 0.0
17. 7506 g-o-p-4ee-a01-1-e 0.0% 10 250.3 250.3 250.2 250.5 0.0
18. 7506 unused-157-7-041- 0.0% 10 257.0 256.9 256.7 257.2 0.0
19. 7506 157-7-107-115.vir 0.0% 10 258.6 258.4 258.2 258.6 0.0
After this patch:
$ mtr --report -y 4 nic.co.jp
Start: Thu Jun 9 19:12:30 2016
HOST: gilead Loss% Snt Last Avg Best Wrst StDev
1. 2004-04-05 gatwick.net.cl.ca 0.0% 10 3.6 7.3 1.2 18.1 5.9
2. cl-wgb.route-west 0.0% 10 0.6 0.8 0.5 1.3 0.0
3. d-we.c-ce.net.cam 0.0% 10 0.5 0.7 0.5 1.0 0.0
4. c-ce.b-ec.net.cam 0.0% 10 0.4 1.6 0.3 9.1 2.6
5. ae1.cambab-rbr1.e 0.0% 10 0.4 0.5 0.3 0.7 0.0
6. 146.97.65.118 0.0% 10 0.5 1.1 0.5 5.0 1.3
7. 146.97.38.17 0.0% 10 3.7 8.4 3.4 51.9 15.3
8. ae29.londtn-sbr1. 0.0% 10 3.7 9.0 3.5 54.8 16.1
9. 2002-03-20 ix-ae-11-0.tcore1 0.0% 10 5.5 4.1 3.5 6.0 0.8
10. 195.219.83.186 0.0% 10 4.0 4.2 3.9 4.6 0.0
11. ae-4.r22.londen03 0.0% 10 3.8 9.5 3.8 33.6 11.6
12. ae-6.r21.sngpsi05 20.0% 10 185.8 181.0 179.5 185.8 2.1
13. ae-20.r31.tokyjp0 0.0% 10 249.9 249.7 249.5 249.9 0.0
14. ae-21.r00.tokyjp0 0.0% 10 266.1 266.0 265.7 266.4 0.0
15. 2000-09-29 ae-0.gmo.tokyjp05 0.0% 10 243.8 243.8 243.4 244.4 0.0
16. ??? ??? 100.0 10 0.0 0.0 0.0 0.0 0.0
17. g-o-p-4ee-a01-1-e 0.0% 10 246.1 246.2 245.7 247.4 0.0
18. unused-157-7-041- 0.0% 10 257.3 258.0 256.9 260.9 1.2
19. 157-7-107-115.vir 0.0% 10 258.3 258.4 258.2 258.8 0.0
Baptiste Jonglez [Thu, 9 Jun 2016 17:43:27 +0000 (18:43 +0100)]
Cosmetic cleanup of the option-parsing code
Align everything nicely, update helpful comments, and use NULL instead
of 0 for the third element of long_options: it's a pointer, see getopt(3).
Baptiste Jonglez [Thu, 9 Jun 2016 16:50:13 +0000 (17:50 +0100)]
Document the -y option in the manpage
Baptiste Jonglez [Thu, 9 Jun 2016 16:19:29 +0000 (17:19 +0100)]
Allow enabling IP info and ASN lookup from the curses interface
Toggling IP info and ASN lookup from the curses interface can be done
using 'z' or 'y'. But it was only allowed if it was first enabled via
a command-line switch (either -z or -y).
rewolff [Tue, 3 May 2016 09:01:11 +0000 (11:01 +0200)]
Merge pull request #115 from aquerubin/newdns
Use setcap instead of setuid when installing the binary.
rewolff [Tue, 3 May 2016 09:00:18 +0000 (11:00 +0200)]
Merge pull request #114 from aquerubin/master
Use setcap instead of setuid when installing the binary.
Antonio Querubin [Tue, 3 May 2016 08:47:09 +0000 (22:47 -1000)]
Merge remote-tracking branch 'origin/master' into newdns
Antonio Querubin [Tue, 3 May 2016 08:43:08 +0000 (22:43 -1000)]
Use setcap instead of setuid when installing the binary.
rewolff [Tue, 3 May 2016 05:15:23 +0000 (07:15 +0200)]
Merge pull request #113 from aquerubin/newdns
Need to error check getnameinfo().
rewolff [Tue, 3 May 2016 05:11:11 +0000 (07:11 +0200)]
Merge pull request #112 from aquerubin/master
Correct psize for IPv6.
Antonio Querubin [Tue, 3 May 2016 02:17:14 +0000 (16:17 -1000)]
Need to error check getnameinfo().
aquerubin [Sat, 10 Jan 2015 08:35:36 +0000 (22:35 -1000)]
Correct psize for IPv6.
rewolff [Sat, 30 Apr 2016 12:35:39 +0000 (14:35 +0200)]
Merge pull request #111 from aquerubin/newdns
Merge master into newdns
Antonio Querubin [Sat, 30 Apr 2016 11:42:41 +0000 (01:42 -1000)]
Merge remote-tracking branch 'origin/master' into newdns
Conflicts:
dns.c
R.E. Wolff [Fri, 29 Apr 2016 14:43:57 +0000 (16:43 +0200)]
net.c fix from AQ.
rewolff [Fri, 29 Apr 2016 08:13:43 +0000 (10:13 +0200)]
Merge pull request #110 from russor/master
allow udp traceroute with fixed source and destination ports
russor [Mon, 18 Apr 2016 22:22:50 +0000 (15:22 -0700)]
correct checksum calculation when adding the overflow overflows
you can see this with a bit pattern of FF and a large packet length
russor [Mon, 18 Apr 2016 22:13:21 +0000 (15:13 -0700)]
copy odd byte into a 16-bit temp value; used bit-sized types for calrity
russor [Mon, 18 Apr 2016 20:50:25 +0000 (13:50 -0700)]
endian neutral placement of alternate checksum
russor [Mon, 18 Apr 2016 20:47:14 +0000 (13:47 -0700)]
fix placement of zeros when running alternate udp checksum
russor [Mon, 18 Apr 2016 20:28:43 +0000 (13:28 -0700)]
fix improper aliasing
russor [Fri, 26 Feb 2016 01:30:19 +0000 (17:30 -0800)]
automatically set udp address if needed
russor [Fri, 26 Feb 2016 00:39:13 +0000 (16:39 -0800)]
set the local address for display if it was bound
russor [Fri, 8 Apr 2016 23:34:26 +0000 (16:34 -0700)]
fix checksum for odd sized packets
russor [Thu, 25 Feb 2016 22:31:58 +0000 (14:31 -0800)]
allow setting local and remote port for UDP probing
This allows for testing over a single network path in a load balanced
network where flows are hashed on the ips and ports (relatively common), the
default behavior is to use the destination port as the sequence number when
doing UDP probes, so you see (more or less) an average of all the paths.
If the remote port is set, we need to use the checksum field to store
sequence and adjust the paylod so the checksum is valid; therefore we need
to have the source address, as it's part of the checksum calculation. We
also need to increase the minimum packet size so we have at least 2 bytes of
payload.
rewolff [Mon, 4 Jan 2016 11:50:14 +0000 (12:50 +0100)]
Merge pull request #103 from jwilk/master
Fix typos
Jakub Wilk [Mon, 4 Jan 2016 11:42:23 +0000 (12:42 +0100)]
Fix typos.
rewolff [Sat, 2 Jan 2016 10:37:43 +0000 (11:37 +0100)]
Merge pull request #102 from tbaschak/32bitasns
Update asn.c - 32bit ASN widths
Theo Baschak [Sat, 2 Jan 2016 05:59:28 +0000 (23:59 -0600)]
Update asn.c - 32bit asn widths
Now that 32-bit ASNs are becoming more common the output of -z should take their width into consideration.
rewolff [Sat, 26 Dec 2015 14:18:19 +0000 (15:18 +0100)]
Merge pull request #101 from trittweiler/master
Fix setting length field of UDP header to broken value on BSD systems.
Tobias Rittweiler [Sat, 26 Dec 2015 12:02:39 +0000 (13:02 +0100)]
Fix setting length field of UDP header to broken value on BSD systems.
As per http://stackoverflow.com/a/
15881825 which references the manpage
ip(4) on *BSD and MacOSX:
"The ip_len and ip_off fields must be provided in host byte order.
All other fields must be provided in network byte order."
Before this commit, mtr would incorrectly set the length field of the UDP
header in host byte order after the first packet, as can be witnessed in
the following excerpt:
1st packet (TTL=1):
IP (tos 0x0, ttl 1, id 51530, offset 0, flags [none], proto UDP (17), length 64)
192.168.178.61.1143 > 8.8.8.8.33000: UDP, *** length 36 ***
IP (tos 0xc0, ttl 64, id 34040, offset 0, flags [none], proto ICMP (1), length 92)
192.168.178.1 > 192.168.178.61: ICMP time exceeded in-transit, length 72
IP (tos 0x0, ttl 1, id 51530, offset 0, flags [none], proto UDP (17), length 64)
192.168.178.61.1143 > 8.8.8.8.33000: UDP, length 36
2nd packet (TTL=2):
IP (tos 0x0, ttl 2, id 17256, offset 0, flags [none], proto UDP (17), length 64)
192.168.178.61.1143 > 8.8.8.8.33001: UDP, *** bad length 11256 > 36 ***
IP (tos 0xc0, ttl 254, id 6765, offset 0, flags [none], proto ICMP (1), length 56)
62.52.201.192 > 192.168.178.61: ICMP time exceeded in-transit, length 36
IP (tos 0x0, ttl 1, id 17256, offset 0, flags [none], proto UDP (17), length 64)
192.168.178.61.1143 > 8.8.8.8.33001: UDP, bad length 11256 > 36
3rd packet (TTL=3):
IP (tos 0x0, ttl 3, id 54343, offset 0, flags [none], proto UDP (17), length 64)
192.168.178.61.1143 > 8.8.8.8.33002: UDP, *** bad length 11256 > 36 ***
IP (tos 0x0, ttl 253, id 0, offset 0, flags [none], proto ICMP (1), length 56)
62.53.22.220 > 192.168.178.61: ICMP time exceeded in-transit, length 36
IP (tos 0x0, ttl 1, id 54343, offset 0, flags [none], proto UDP (17), length 64)
192.168.178.61.1143 > 8.8.8.8.33002: UDP, bad length 11256 > 36
rewolff [Sat, 26 Dec 2015 11:08:47 +0000 (12:08 +0100)]
Merge pull request #100 from trittweiler/master
Fix and improvements for --csv
Tobias Rittweiler [Fri, 25 Dec 2015 12:11:00 +0000 (13:11 +0100)]
asn.h: Guard against being included twice.
In order to surpress a warning on clang.