History log of /freebsd-head/usr.sbin/traceroute6/traceroute6.c
Revision Date Author Comments
328743aed826a2118aacdca24ebff36133d98e8a 22-Jul-2019 asomers <asomers@FreeBSD.org> Remove the USE_RFC2292BIS option and reap dead code

This option was imported as part of the KAME project in r62627 (in 2000).
It was turned on unconditionally in r121472 (in 2003) and has been on ever
since. The old alternative code has bitrotted. Reap the dead code.

Reported by: Ján Sučan <jansucan@gmail.com>
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D20938
fd9aa0d194d7baf8940e48ee154880dbf9b0c6b1 16-Jul-2019 tuexen <tuexen@FreeBSD.org> Add support for ICMPv6 messages indicating a parameter problem related
to an unrecognized next header.

MFC after: 2 weeks
087b61e2cc33bf96aaf4db9f60a0e21d93c079a6 16-Jul-2019 tuexen <tuexen@FreeBSD.org> Let packet_op() explicitly return the type and code instead of doing
this implicitly by encoding it in a number space.

No functional change intended.

This is done as a preparation to add support for ICMPv6 mesages
indicating a parameter problem related to the next header.

MFC after: 2 weeks
a949569cc7d6426e4a86bdbac96e541bb54695bc 16-Jul-2019 tuexen <tuexen@FreeBSD.org> Whitespace change. No functional change.

MFC after: 2 weeks
e684942ac0c3cbdca16b3ed98c87026db64a9c79 27-Jan-2018 tuexen <tuexen@FreeBSD.org> When using SCTP for sending probe packets, use INIT chunks for payloads
larger than or equal to 32 bytes. For smaller probe packets, keep using
SHUTDOWN-ACK chunks, possibly bundled with a PAD chunk.
Packets with INIT chunks more likely pass through firewalls. Therefore,
use them when possible.

MFC after: 1 week
872b698bd4a1bfc0bf008c09228e6fd238809c75 20-Nov-2017 pfg <pfg@FreeBSD.org> General further adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 3-Clause license.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

Special thanks to Wind River for providing access to "The Duke of
Highlander" tool: an older (2014) run over FreeBSD tree was useful as a
starting point.
c8f149c5d07c245c9dee84a1db5a75d9a4b2374f 30-Sep-2017 tuexen <tuexen@FreeBSD.org> Fix reporting of probing size. This bug was introduced in r324119.

MFC after: 4 weeks
76aaad634bd9f4e3a49c7baf4ed8a35123622d0a 30-Sep-2017 tuexen <tuexen@FreeBSD.org> Add SCTP and TCP as protocols for sending probe packets.

MFC after: 4 weeks
3d7880b635f497431cf392750b2a1d355064949b 30-Sep-2017 tuexen <tuexen@FreeBSD.org> * Update function definitions.
* Ensure that the datalen always describes the length after the IPv6
header consistently, not matter which protocol us used for probes..
* Document that the default length is 20, not 12.
* Don't send inormation in probe packets which is not needed or
even checked when the responses are processed.
* Address CID 978587.

This is mainly a cleanup preparing the addition of SCTP and TCP
as possible probe packet protocols.

MFC after: 4 weeks
7e6cabd06e6caa6a02eeb86308dc0cb3f27e10da 28-Feb-2017 imp <imp@FreeBSD.org> Renumber copyright clause 4

Renumber cluase 4 to 3, per what everybody else did when BSD granted
them permission to remove clause 3. My insistance on keeping the same
numbering for legal reasons is too pedantic, so give up on that point.

Submitted by: Jan Schaumann <jschauma@stevens.edu>
Pull Request: https://github.com/freebsd/freebsd/pull/96
c5bff35f2d4f6527d5fb10f50f3fd3e9dabb2b03 05-Nov-2016 hrs <hrs@FreeBSD.org> Fix an infinite loop at an non-responding hop when other echo replies
are kept arriving in the waittime time window.

Submitted by: Denny Page
PR: 210286
MFC after: 3 days
00d578928eca75be320b36d37543a7e2a4f9fbdb 27-May-2016 grehan <grehan@FreeBSD.org> Create branch for bhyve graphics import.
b3857d7c402e06970db2975dfb9c71ba6fd66fe6 12-May-2016 pfg <pfg@FreeBSD.org> traceroute6(8): use NULL instead of zero for initializing a pointer.
eb1a5f8de9f7ea602c373a710f531abbf81141c4 21-Feb-2014 gjb <gjb@FreeBSD.org> Move ^/user/gjb/hacking/release-embedded up one directory, and remove
^/user/gjb/hacking since this is likely to be merged to head/ soon.

Sponsored by: The FreeBSD Foundation
6b01bbf146ab195243a8e7d43bb11f8835c76af8 27-Dec-2013 gjb <gjb@FreeBSD.org> Copy head@r259933 -> user/gjb/hacking/release-embedded for initial
inclusion of (at least) arm builds with the release.

Sponsored by: The FreeBSD Foundation
8120b09fe9332fb0fd25fb29d6a2e8b7f0872b9e 08-May-2012 ume <ume@FreeBSD.org> Add -a and -A option to the usage.

MFC after: 1 week
0b5bdd518a11b52d15aff2e28c8409db9a134c6d 11-Dec-2010 joel <joel@FreeBSD.org> Remove the advertising clause from UCB copyrighted files in usr.sbin. This
is in accordance with the information provided at
0114bdf52f64f9eaf589d9f88706c9519479deab 04-Dec-2010 uqs <uqs@FreeBSD.org> traceroute6(8): make WARNS=3 clean
09f9c897d33c41618ada06fbbcf1a9b3812dee53 19-Oct-2010 jamie <jamie@FreeBSD.org> A new jail(8) with a configuration file, to replace the work currently done
by /etc/rc.d/jail.
f1216d1f0ade038907195fc114b7e630623b402c 19-Mar-2010 delphij <delphij@FreeBSD.org> Create a custom branch where I will be able to do the merge.
9a11e310006fb7e9bc4ef7590cd176a3e72ea9d2 13-Sep-2009 ume <ume@FreeBSD.org> MFC r196475:
- Add AS lookup functionality to traceroute6(8) as well.
- Support for IPv6 transport for AS lookup.
- Introduce $RA_SERVER to set whois server.
- Support for 4 byte ASN.
- ANSIfy function declaration in as.c.

Approved by: re (kib)
e9fb7bf28d0712b4366f9f39010c865c03853ac6 23-Aug-2009 ume <ume@FreeBSD.org> - Add AS lookup functionality to traceroute6(8) as well.
- Support for IPv6 transport for AS lookup.
- Introduce $RA_SERVER to set whois server.
- Support for 4 byte ASN.
- ANSIfy function declaration in as.c.

Tested by: IHANet folks.
19b6af98ec71398e77874582eb84ec5310c7156f 22-Nov-2008 dfr <dfr@FreeBSD.org> Clone Kip's Xen on stable/6 tree so that I can work on improving FreeBSD/amd64
performance in Xen's HVM mode.
cf5320822f93810742e3d4a1ac8202db8482e633 19-Oct-2008 lulf <lulf@FreeBSD.org> - Import the HEAD csup code which is the basis for the cvsmode work.
751aa6a0008e86dac5dea8a377f1a2d5bab71fa7 20-May-2008 dwmalone <dwmalone@FreeBSD.org> Sync with -current:
- ability to traceroute with packets with no upper layer header.
- clean __P use.
- place each router entry on its own line.
- get ipsec.h from netipsec directory.
2c5ea8a4e5c9ea439e32e907aa0821d042043d75 20-May-2008 dwmalone <dwmalone@FreeBSD.org> Sync with current - add the ability to traceroute with no-next-header
dca3074678fb1339515c7936447df93d7a793e38 10-Feb-2008 dwmalone <dwmalone@FreeBSD.org> Give traceroute6 the ability to traceroute with packets with no
upper layer header (IP PROTO = 59). Useful for testing firewalls.

MFC after: 2 months
fa3791e1a7df72dae386c39862c6dad9fb7a5304 07-Nov-2007 kevlo <kevlo@FreeBSD.org> Cleanup of userland __P use
3cda3277b38e0420dd475348ac72cfc8fff74366 24-Oct-2007 csjp <csjp@FreeBSD.org> When processing multi-path ip6 routers, place each router entry on its
own line. We made this change in traceroute(8) some time ago. This
is particularly useful when you are not resolving hostnames since ip6
addresses can be quite long, and lines wrap fairly easily in the
multi-path router case.

Discussed with: bz
MFC after: 1 month
f5875f045c1546f7504a2a0c4bc6744948772a54 01-Jul-2007 gnn <gnn@FreeBSD.org> Commit IPv6 support for FAST_IPSEC to the tree.
This commit includes all remaining changes for the time being including
user space updates.

Submitted by: bz
Approved by: re
de712d044322475f62c12ebf003b2ebba7a72122 31-May-2007 maxim <maxim@FreeBSD.org> MFC rev. 1.33 traceroute.c and rev. 1.18 traceroute6.c: make it
possible to use 1 sec wait time.
b4aa820f7040499dcde01be962528453dbd12e1c 30-Apr-2007 maxim <maxim@FreeBSD.org> o I failed to find a suitable explanation why traceroute(8) and
traceroute6(8) force -w flag (wait time) to be > 1 sec. Make it
possible to use 1 sec wait time.

PR: bin/110933
Submitted by: Dmitry Marakasov
Reviewed by: freebsd-net (silence)
MFC after: 1 month
d98014253f49f491a1e64c4e586869119168ebf5 08-Mar-2007 kevlo <kevlo@FreeBSD.org> Use setresuid for simple privilege dropping.
94f966107488b283be9c736af97cb8203614573b 13-Jun-2004 dwmalone <dwmalone@FreeBSD.org> Sync up with KAME. The main change is to try to avoid exposing
exposing information about the endianness and alighment requirements
in the packets sent by traceroute6.

Obtained from: KAME
2dad2898ac513388610e8697b5ec6ace2e1f25da 12-Nov-2003 ume <ume@FreeBSD.org> - setsockopt/sysctl takes int, not u_long.
- be more picky about argument parsing - like ERANGE.
- use u_long for args, not to lose accuracy/prevent overflow.
- socklen_t audit.
- Add -I (use icmp) option.
- warn if multiple addresses are present for dest.
- no need to pass tz.
- type pedant. check -p range.
- grab hlim from sysctl.
- typo in port number setting.

Obtained from: KAME
8b886ae21e6d78c9b2070a561fbb2648fab48ad6 23-Oct-2003 ume <ume@FreeBSD.org> - style
- index() -> strchr()
- stop use of MAXHOSTNAMELEN

Obtained from: KAME
bf741bc603a4e3d435392d831a2e8a401ed1d49e 21-Oct-2003 ume <ume@FreeBSD.org> stop use of NI_WITHSCOPEID. it was deprecated.

Obtained from: KAME
68415c8fc274a99c4e5704a73074d4f12f834a92 21-Jul-2003 maxim <maxim@FreeBSD.org> Quote from a Problem Report:

The output format specifier for the round-trip time in ping6 should be
changed to %.3f instead of %g since %g doesn't accurately represent the
precision of the number being output. In particular, %g truncates trailing
zeroes. 0.01 ms does not mean the same thing as 0.010 ms. Although they
are numerically identical, they do not have the same precision.

PR: bin/52324, bin/52750
Submitted by: dg
MFC after: 1 week
d3367c5f5d3ddcc6824d8f41c4cf179f9a5588f8 01-Jan-2003 schweikh <schweikh@FreeBSD.org> Correct typos, mostly s/ a / an / where appropriate. Some whitespace cleanup,
especially in troff files.
f005a7d8a019151f00fed1e56fd983935498ec67 09-Sep-2002 nectar <nectar@FreeBSD.org> Back out previous commit. I was a bit overzealous: the fd_set size is
calculated dynamically here.
38c1241397d4842137e208a9bb1e3c901e533dd6 09-Sep-2002 nectar <nectar@FreeBSD.org> Check for FD_SET overrun.
832f8d224926758a9ae0b23a6b45353e44fbc87a 11-Jun-2001 ume <ume@FreeBSD.org> Sync with recent KAME.
This work was based on kame-20010528-freebsd43-snap.tgz and some
critical problem after the snap was out were fixed.
There are many many changes since last KAME merge.

- The definitions of SADB_* in sys/net/pfkeyv2.h are still different
from RFC2407/IANA assignment because of binary compatibility
issue. It should be fixed under 5-CURRENT.
- ip6po_m member of struct ip6_pktopts is no longer used. But, it
is still there because of binary compatibility issue. It should
be removed under 5-CURRENT.

Reviewed by: itojun
Obtained from: KAME
MFC after: 3 weeks
96f85c70726a94ab2be7e3a1fd56ef6c02f0b318 08-Oct-2000 kris <kris@FreeBSD.org> Sync with KAME. Don't write past the end of the fd_set.

Obtained from: KAME
b1da3ba3c9fcdd3bfd892540fb1f39c9a3f12264 05-Aug-2000 kris <kris@FreeBSD.org> Don't call errx() without a format string, to protect against possible
localized error messages from ipsec_strerror().

Obtained from: OpenBSD
4bf2ee28177f0ea34186c988894ee9ad966de5e4 05-Jul-2000 kris <kris@FreeBSD.org> Sync with latest KAME code.

Obtained from: KAME
b42951578188c5aab5c9f8cbcde4a743f8092cdc 02-Apr-2000 cvs2svn <cvs2svn@FreeBSD.org> This commit was manufactured by cvs2svn to create branch 'ALSA'.
1c7bbb579dd0129ebb51ad5dc7cf1acd37706219 24-Feb-2000 shin <shin@FreeBSD.org> Security fixes. (Just same as sbin/ping and usr.sbin/traceroute)
-Open socket() at first and then setuid() to actual user.
-Allow ping6 preload option only for root.

Approved by: jkh

Submitted by: Neil Blakey-Milner <nbm@mithrandr.moria.org>
04d9137ab519e19100c8b0a44782794316395ec8 09-Jan-2000 shin <shin@FreeBSD.org> replace gethostbyname() with getaddrinfo(), and gethostbyaddr() with
This resolve 2 problems.
-can specify scope index(@ifname) for IPv6 link local addr
-reverse lookup for IPv6 loopback addr(::1) was strange, but fixed
5a9ffb7f5aae940fea91a0088b42469832041093 07-Jan-2000 shin <shin@FreeBSD.org> remove redundant ifdef's.

some part is specified by: phantom
8c2ccb59caf882ac518eda1f570ea731d4466216 28-Dec-1999 shin <shin@FreeBSD.org> Getaddrinfo(), getnameinfo(), and etc support in libc/net.
Several udp and raw apps IPv6 support.

Reviewed by: freebsd-arch, cvs-committers
Obtained from: KAME project