summaryrefslogtreecommitdiffstats
path: root/sbin/ping6/ping6.c
Commit message (Collapse)AuthorAgeFilesLines
* MFC r286834:delphij2015-08-311-14/+1
| | | | Use arc4random_buf(). While there, unifdef the code for !HAVE_ARC4RANDOM.
* MFC r271910, r273211:hrs2015-07-231-233/+206
| | | | | | | | | | | | | | | | | * Add -x waittime and -X timeout options for feature parity. These are equivalent to -W and -t options of ping(8). Different letters are used because both have already been used for another purposes in ping6(8). * Fix a problem that reply packets are not received when -i T option is set and (T < RTT). - Use select(2) for timeout instead of interval timer. Remove poll(2) support. - Use sigaction(2) instead of signal(3). - Exit in SIGINT handler when two signals are received and doing reverse DNS lookup as ping(8) does. - Remove redundant variables used for getaddrinfo(3). Approved by: re (gjb)
* MFC r271909:hrs2014-10-091-8/+2
| | | | | Revert changes in r269180. It could cause -c N option to enter an infinite loop if no reply packet is received.
* MFC r269180:delphij2014-08-111-2/+8
| | | | | | | | | | | When interval is set to very small value with limited amount of packets, ping6(8) would quit before the remote side gets a chance to respond. Solve this by resetting the itimer when we have reached the maximum packet number have reached, but let the other handling to continue. PR: bin/151023 Submitted by: tjmao at tjmao.net
* Use FF02:0:0:0:0:2:FF00::/104 prefix for IPv6 Node Information Grouphrs2013-05-041-6/+23
| | | | | | | | | | | | | | | | | | Address. Although KAME implementation used FF02:0:0:0:0:2::/96 based on older versions of draft-ietf-ipngwg-icmp-name-lookup, it has been changed in RFC 4620. The kernel always joins the /104-prefixed address, and additionally does /96-prefixed one only when net.inet6.icmp6.nodeinfo_oldmcprefix=1. The default value of the sysctl is 1. ping6(8) -N flag now uses /104-prefixed one. When this flag is specified twice, it uses /96-prefixed one instead. Reviewed by: ume Based on work by: Thomas Scheffler PR: conf/174957 MFC after: 2 weeks
* Check the return error of set[ug]id. While this can never fail in theeadler2012-10-221-2/+4
| | | | | | | | | | | | | | current version of FreeBSD, this isn't guarenteed by the API. Custom security modules, or future implementations of the setuid and setgid may fail. PR: bin/172289 PR: bin/172290 PR: bin/172291 Submittud by: Erik Cederstrand <erik@cederstrand.dk> Discussed by: freebsd-security Approved by: cperciva MFC after: 1 week
* Fix warning when compiling with gcc46:eadler2012-01-101-2/+1
| | | | | | | error: variable 'origextlen' set but not used Approved by: dim MFC after: 3 days
* Spelling fixes for sbin/uqs2012-01-071-1/+1
|
* Add __unused. Ansi prototypes.charnier2010-12-191-66/+34
|
* Remove the advertising clause from UCB copyrighted files in sbin. Thisjoel2010-12-121-4/+0
| | | | | is in accordance with the information at ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change
* Call free and freeaddrinfo before exiting.brucec2010-06-161-14/+35
| | | | | | | | PR: bin/144730 PR: bin/144974 Submitted by: Earl R. Lapus <earl.lapus at gmail.com> Approved by: rrs (mentor) MFC after: 1 month
* o Add do-not-fragment option support to ping6(8).maxim2010-04-201-3/+11
| | | | | | PR: bin/145759 Submitted by: pluknet MFC after: 1 month
* Implement -R support, similar to ping(8)'s -A.matteo2008-08-271-6/+16
| | | | | | | | | | ping(8)'s -a was mapped to -e, but -E was already taken in ping6 (old option) so rename -e to -r. Now: ping -a => ping6 -r ping -A => ping6 -R MFC after: 2 days
* Add -e to usage()matteo2008-08-271-1/+1
| | | | MFC after: 2 days
* Implement audible support similar to ping(8) -a option. Since -a was already ↵matteo2008-08-261-1/+8
| | | | | | | taken, I chose -e (no real argument for this) but I'm willing to change to a different character if needed/desired. PR: bin/123752 (inspired by) MFC after: 2 days
* Change the exit status for 0 and 2 to be the same as with ping(1)bz2008-05-271-2/+5
| | | | | | | | | | and be usable in scripts, etc. This also changes the semantics in case when we lose one of n packets. In that case, before we exited by SIG, now we exit with return(0). Submitted by: Gert Doering (gert space.net) MFC after: 10 days
* Decrease ping6's minimum allowed intervalsilby2008-02-251-3/+3
| | | | | | | | | | from .01 to .000001. Note that due to the architecture of ping6, you are still limited to kern.hz pings per second. MFC after: 2 weeks
* Add -o option to match ping(8)dd2007-11-201-3/+8
| | | | | Reviewed by: dwmalone, maxim MFC after: 2 weeks
* Commit IPv6 support for FAST_IPSEC to the tree.gnn2007-07-011-2/+2
| | | | | | | | This commit includes all remaining changes for the time being including user space updates. Submitted by: bz Approved by: re
* Correct two issues in ping6:mtm2007-04-191-19/+68
| | | | | | | | | | | | | | | | | | | | 1. The static buffer that ping6(8) uses to hold the control data it gets from recvmsg(2) is too small in some cases. 2. When it prints the extra header information it doesn't do any checking to make sure the data it's printing is within the bounds of the supplied buffer. Fix this by: o Increasing the buffer to hold extra headers to 10240 bytes (the minimum according to RFC3542 sec. 20.1) and allocate it dynamically. o In verbose mode, specify a warning if any control data from recvmsg(2) was truncated because the buffer was too small. o When printing the extra headers make sure not to overrun the buffer boundaries. Reviewed By: mlaier PR: kern/99425 MFC After: 1 month
* Sync program's usage() with manpage's SYNOPSIS.ru2005-02-101-12/+17
|
* Fix build on all (hopefully) 64 bit architectures.trhodes2005-01-091-1/+1
| | | | | Noticed by: tinderbox Tested on: panther
* Use static const char and bump WARNS.trhodes2005-01-081-1/+1
|
* re-enabled Rev 1.15 (lost during KAME merge at Rev 1.25, due to a KAME bug...)suz2004-07-261-1/+1
| | | | Obtained from: KAME
* Switch Advanced Sockets API for IPv6 from RFC2292 to RFC3542ume2003-10-241-181/+200
| | | | | | | | | | (aka RFC2292bis). Though I believe this commit doesn't break backward compatibility againt existing binaries, it breaks backward compatibility of API. Now, the applications which use Advanced Sockets API such as telnet, ping6, mld6query and traceroute6 use RFC3542 API. Obtained from: KAME
* stop use of NI_WITHSCOPEID. it was deprecated.ume2003-10-211-6/+1
| | | | Obtained from: KAME
* Quote from a Problem Report:maxim2003-07-211-1/+1
| | | | | | | | | | | | 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
* corrected buffer lengths for memset()suz2002-12-061-2/+2
| | | | | obtained from: KAME MFC after: 3 days
* Back out previous commit. I was a bit overzealous: the fd_set size isnectar2002-09-091-2/+0
| | | | calculated dynamically here.
* Check for FD_SET overrun.nectar2002-09-091-0/+2
|
* Don't explicit kill of the process' own pid.ume2002-07-071-5/+4
| | | | | | PR: bin/38862 Submitted by: Martin Faxer <gmh003532@brfmasthugget.se> with some modification MFC after: 1 week
* o remove __Pimp2002-03-211-31/+30
| | | | o remove main prototype
* Remove 'register' keyword.obrien2002-03-201-3/+3
| | | | | | It does not help modern compilers, and some may take some hit from it. (I also found several functions that listed *every* of its 10 local vars with "register" -- just how many free registers do people think machines have?)
* Show standard deviation.ume2002-03-011-4/+4
| | | | | | | PR: bin/35433 Submitted by: Morten Rodal <morten@rodal.no>, Maxim Konovalov <maxim@macomnet.ru> MFC after: 1 week
* First ping after a preload (-l) was sent undelayed.ru2002-01-151-1/+2
| | | | | PR: bin/32354 Obtained from: ping.c,v 1.61
* spellingcharnier2001-12-111-20/+14
| | | | | | move some err() calls to errx() when message explains the pb enough do not set errno just before exiting the program lowercase errx() strings
* Handle snprintf() returning < 0 (not just -1)brian2001-08-201-1/+1
| | | | MFC after: 2 weeks
* Handle snprintf() returning -1.brian2001-08-201-1/+1
| | | | MFC after: 2 weeks
* sync usage/description with reality.ume2001-06-291-1/+5
| | | | | Obtained from: KAME MFC after: 1 week
* stop sending echo packets whenever the upper limit is specified by the -cume2001-06-291-7/+10
| | | | | | | | option, regardless of the -f option. based on a comment from Tomohide Nagashima <tomohide@japan-telecom.co.jp>. Obtained from: KAME MFC after: 1 week
* Sync with recent KAME.ume2001-06-111-434/+1167
| | | | | | | | | | | | | | | | | | 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. TODO: - 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
* test strdup() failures.ume2000-12-041-5/+7
| | | | | | from: Chris Faulhaber <jedgar@fxp.org> Obtained from: KAME
* Don't overflow our fd_set. This is not a full sync with KAME because therekris2000-10-081-9/+11
| | | | | | are a whole lot of other changes which may not be suitable for us. Obtained from: KAME
* Don't call errx() without a format string, to protect against possiblekris2000-08-051-4/+4
| | | | | | % characters in localized error messages from ipsec_strerror(). Obtained from: OpenBSD
* Sync with latest KAME code.kris2000-07-051-215/+622
| | | | Obtained from: KAME
* Update icmp node info query message bit order of query types,shin2000-03-091-1/+5
| | | | | | | | | | | | | according to draft-ietf-ipngwg-icmp-name-lookups-04 to 05 change. This is necessary before 4.0, because, -This change is non backword compatible -Other KAME derived platforms applied 05 -Author of the draft said he never do backword imcompatible changes again. Approved by: jkh Obtained from: KAME project
* Security fixes. (Just same as sbin/ping and usr.sbin/traceroute)shin2000-02-241-3/+8
| | | | | | | | | -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>
* Small bug fix and improvementsshin1999-12-281-2/+8
| | | | | | | | (1)added error check of if_nameindex() return value at getaddrinfo(). (2)print out more detailed information when getaddrinfo() error value is EAI_SYSTEM.(in this case system error num is kept in errno) (1) is Discovered by: jinmei@kame.net in KAME environment.
* Getaddrinfo(), getnameinfo(), and etc support in libc/net.shin1999-12-281-0/+1549
Several udp and raw apps IPv6 support. Reviewed by: freebsd-arch, cvs-committers Obtained from: KAME project
OpenPOWER on IntegriCloud