aboutsummaryrefslogtreecommitdiff
path: root/sbin/ping6
Commit message (Collapse)AuthorAgeFilesLines
* Merge ping6 to pingAlan Somers2020-11-267-3585/+0
| | | | | | | | | | | | | There is now a single ping binary, which chooses to use ICMP or ICMPv4 based on the -4 and -6 options, and the format of the address. Submitted by: Ján Sučan <sucanjan@gmail.com> Sponsored by: Google LLC (Google Summer of Code 2019) MFC after: Never Differential Revision: https://reviews.freebsd.org/D21377 Notes: svn path=/head/; revision=368045
* ping6: update usage text after r365547Alan Somers2020-11-241-1/+2
| | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=367976
* Make use of IP_VLAN_PCP setsockopt in ping and ping6.Richard Scheffenegger2020-10-242-2/+22
| | | | | | | | | | | | | In order to validate the proper marking and use of a different ethernet priority class, add the new session-specific PCP feature to the ping/ping6 utilities. Reviewed by: mav, bcr Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D26627 Notes: svn path=/head/; revision=367021
* Add -z "TOS" option to ping6, to test DSCP/ECN valuesRichard Scheffenegger2020-09-102-2/+22
| | | | | | | | | | | | | | | | ping has the option to add the (deprecated) TOS byte using the -z option. Adding the same option, with the same (deprecated) Traffic Class Byte (nowadays actually DSCP and ECN fields) to ping6 to validate proper QoS processing in network switches. Reviewed by: tuexen MFC after: 2 weeks Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D26384 Notes: svn path=/head/; revision=365547
* Make ping6(1) return code consistent with the man page.Alexander V. Chernikov2020-02-151-2/+10
| | | | | | | | | | | | When every sendto() call originated by ping6(1) fails, current code always returns 2 ("transmission was successful but no responses were received") which is incorrect. Return EX_OSERR instead as in many cases it indicates some kernel-level problems. MFC after: 3 weeks Notes: svn path=/head/; revision=357967
* Update Makefile.depend filesSimon J. Gerraty2019-12-111-1/+2
| | | | | | | | | | | | | Update a bunch of Makefile.depend files as a result of adding Makefile.depend.options files Reviewed by: bdrewery MFC after: 1 week Sponsored by: Juniper Networks Differential Revision: https://reviews.freebsd.org/D22494 Notes: svn path=/head/; revision=355617
* Add Makefile.depend.optionsSimon J. Gerraty2019-12-111-0/+8
| | | | | | | | | | | | | | | | | | | | Leaf directories that have dependencies impacted by options need a Makefile.depend.options file to avoid churn in Makefile.depend DIRDEPS for cases such as OPENSSL, TCP_WRAPPERS etc can be set in local.dirdeps-options.mk which can add to those set in Makefile.depend.options See share/mk/dirdeps-options.mk Reviewed by: bdrewery MFC after: 1 week Sponsored by: Juniper Networks Differential Revision: https://reviews.freebsd.org/D22469 Notes: svn path=/head/; revision=355616
* ping, ping6: Use setitimer(2) instead of obsolete alarm(3)Alan Somers2019-11-261-1/+9
| | | | | | | | Submitted by: Ján Sučan <sucanjan@gmail.com> Differential Revision: https://reviews.freebsd.org/D22103 Notes: svn path=/head/; revision=355106
* Fix option names in the Examples section of the manual pageAlan Somers2019-10-201-3/+3
| | | | | | | | | | | This corrects an oversight from r351423. Submitted by: Ján Sučan <sucanjan@gmail.com> MFC after: Never Differential Revision: https://reviews.freebsd.org/D22093 Notes: svn path=/head/; revision=353779
* ping6: Use caph_rights_limit(3) for STDIN_FILENOMark Johnston2019-09-231-6/+6
| | | | | | | | | | Update some error messages while here. Reported by: olivier MFC after: 3 days Notes: svn path=/head/; revision=352634
* ping6: Rename options for better consistency with pingAlan Somers2019-08-235-63/+63
| | | | | | | | | | | | | Now equivalent options have the same flags, and nonequivalent options have different flags. This is a prelude to merging the two commands. Submitted by: Ján Sučan <sucanjan@gmail.com> MFC: Never Sponsored by: Google LLC (Google Summer of Code 2019) Differential Revision: https://reviews.freebsd.org/D21345 Notes: svn path=/head/; revision=351423
* ping6: add a basic functional testAlan Somers2019-08-224-0/+70
| | | | | | | | | | Submitted by: Ján Sučan <sucanjan@gmail.com> MFC after: 2 weeks Sponsored by: Google, inc. (Google Summer of Code 2019) Differential Revision: https://reviews.freebsd.org/D21292 Notes: svn path=/head/; revision=351394
* ping6: revert r350857Alan Somers2019-08-191-6/+6
| | | | | | | | | | | | | Some socket options require root privileges to set. The old code did indeed drop privileges at the earliest opportunity. Submitted by: Ján Sučan <sucanjan@gmail.com> MFC after: Never Sponsored by: Google, Inc. (Google Summer of Code 2019) Differential Revision: https://reviews.freebsd.org/D21319 Notes: svn path=/head/; revision=351216
* ping6: Raise WARNS level to 6Alan Somers2019-08-171-1/+0
| | | | | | | | | | Submitted by: Ján Sučan <sucanjan@gmail.com> MFC after: 2 weeks Sponsored by: Google, inc. (Google Summer of Code 2019) Differential Revision: https://reviews.freebsd.org/D21260 Notes: svn path=/head/; revision=351172
* ping6: Fix dnsdecode() bug introduced by r350859Alan Somers2019-08-171-10/+28
| | | | | | | | | | | | | | | | | | | | Revision 350859 removed level of indirection that was needed for setting the caller's `cp' pointer. dnsdecode() uses return value to indicate error or success. It returns pointer to a buffer holding a decompressed DNS name or NULL. The caller uses that value only to find out the result, not for accessing the buffer. We use the return value to propagate the new value of `cp' pointer to the caller instead of using an output argument. Submitted by: Ján Sučan <sucanjan@gmail.com> MFC after: 2 weeks MFC-With: 350859 Sponsored by: Google, Inc (Google Summer of Code 2019) Differential Revision: https://reviews.freebsd.org/D21266 Notes: svn path=/head/; revision=351170
* ping6: Fix alignment errorsAlan Somers2019-08-151-39/+71
| | | | | | | | | | | | This fixes -Wcast-align errors when compiled with WARNS=6. Submitted by: Ján Sučan <sucanjan@gmail.com> MFC after: 2 weeks Sponsored by: Google, inc. (Google Summer of Code 2019) Differential Revision: https://reviews.freebsd.org/D21217 Notes: svn path=/head/; revision=351102
* ping6: fix uninitialized variable warnings when MK_CASPER=noAlan Somers2019-08-151-3/+6
| | | | | | | | | | Submitted by: Ján Sučan <sucanjan@gmail.com> MFC after: 2 weeks Sponsored by: Google, inc. (Google Summer of Code 2019) Differential Revision: https://reviews.freebsd.org/D21273 Notes: svn path=/head/; revision=351101
* ping6: Fix data type of the buffer for ancillary data of a received messageAlan Somers2019-08-151-1/+1
| | | | | | | | | | | | The old code worked, but wasted some stack space. Submitted by: Ján Sučan <sucanjan@gmail.com> MFC after: 2 weeks Sponsored by: Google, inc. (Google Summer of Code 2019) Differential Revision: https://reviews.freebsd.org/D21275 Notes: svn path=/head/; revision=351090
* ping6: fix uninitialized variable warning for intvlAlan Somers2019-08-151-3/+3
| | | | | | | | | | | | GCC isn't smart enough to realize that this variable was always initialized. Submitted by: Ján Sučan <sucanjan@gmail.com> MFC after: 2 weeks Sponsored by: Google, inc. (Google Summer of Code 2019) Differential Revision: https://reviews.freebsd.org/D21271 Notes: svn path=/head/; revision=351082
* ping6: quiet an undefined variable warningAlan Somers2019-08-151-1/+1
| | | | | | | | | | | | | GCC 4.2 isn't smart enough to know that this variable is already defined by the time it's used. Submitted by: Ján Sučan <sucanjan@gmail.com> MFC after: 2 weeks Sponsored by: Google, inc. (Google Summer of Code 2019) Differential Revision: https://reviews.freebsd.org/D21269 Notes: svn path=/head/; revision=351080
* ping6: quiet warning about unused copyright variableAlan Somers2019-08-151-2/+2
| | | | | | | | | | Submitted by: Ján Sučan <sucanjan@gmail.com> MFC after: 2 weeks Sponsored by: Google, inc. (Google Summer of Code 2019) Differential Revision: https://reviews.freebsd.org/D21270 Notes: svn path=/head/; revision=351079
* ping6: use the monotonic clock to measure durationsAlan Somers2019-08-131-54/+37
| | | | | | | | | | Submitted by: Ján Sučan <sucanjan@gmail.com> MFC after: 2 weeks Sponsored by: Google, inc. (Google Summer of Code 2019) Differential Revision: https://reviews.freebsd.org/D21226 Notes: svn path=/head/; revision=350997
* Consistently use the byteorder functions in the correct directionAlan Somers2019-08-131-5/+5
| | | | | | | | | | | | Though ntohs and htons are functionally identical, they have different meanings.Using the correct one helps to document the code. Submitted by: Ján Sučan <sucanjan@gmail.com> MFC after: 2 weeks Sponsored by: Google, inc. (Google Summer of Code 2019) Differential Revision: https://reviews.freebsd.org/D21219 Notes: svn path=/head/; revision=350993
* ping6: Fix data type of a variable for a packet sequence numberAlan Somers2019-08-131-1/+1
|\ | | | | | | | | | | | | | | | | | | Submitted by: Ján Sučan <sucanjan@gmail.com> MFC after: 2 weeks Sponsored by: Google, inc. (Google Summer of Code 2019) Differential Revision: https://reviews.freebsd.org/D21218 Notes: svn path=/head/; revision=350987
| * ping6: Fix data type of a variable for a packet sequence numberAlan Somers2019-08-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | Submitted by: Ján Sučan <sucanjan@gmail.com> MFC after: 2 weeks Sponsored by: Google, inc. (Google Summer of Code 2019) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D21218 Notes: svn path=/projects/fuse2/; revision=350944
* | ping6: Remove unnecessary level of indirection from dnsdecode() parameterAlan Somers2019-08-111-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `sp' pointer doesn't need to be modified in the caller of dnsdecode(). This fixes -Wcast-qual error (`must have all intermediate pointers const qualified to be safe') when compiled with WARNS=6. Submitted by: Ján Sučan <sucanjan@gmail.com> MFC after: 2 weeks Sponsored by: Google, inc. (Google Summer of Code 2019) Differential Revision: https://reviews.freebsd.org/D21215 Notes: svn path=/head/; revision=350859
* | ping6: Add missing static keyword for a global variableAlan Somers2019-08-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | This fixes -Wmissing-variable-declarations error when compiled with WARNS=6. Submitted by: Ján Sučan <sucanjan@gmail.com> MFC after: 2 weeks Sponsored by: Google, inc. (Google Summer of Code 2019) Differential Revision: https://reviews.freebsd.org/D21214 Notes: svn path=/head/; revision=350858
* | ping6: Revoke root privilege earlierAlan Somers2019-08-111-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | It can be done just after the sockets have been created. Submitted by: Ján Sučan <sucanjan@gmail.com> MFC after: 2 weeks Sponsored by: Google, inc. (Google Summer of Code 2019) Differential Revision: https://reviews.freebsd.org/D21213 Notes: svn path=/head/; revision=350857
* | Capsicumize ping6Alan Somers2019-08-032-47/+147
|/ | | | | | | | | | | | | Add capsicum support to ping6, mostly copying the strategy used for ping. Submitted by: Ján Sučan <jansucan@gmail.com> Reviewed by: markj MFC after: 2 weeks Sponsored by: Google, inc. (Google Summer of Code 2019) Differential Revision: https://reviews.freebsd.org/D21050 Notes: svn path=/head/; revision=350556
* Remove the USE_RFC2292BIS option and reap dead codeAlan Somers2019-07-222-50/+1
| | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=350225
* General further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-201-1/+3
| | | | | | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=326025
* DIRDEPS_BUILD: Update dependencies.Bryan Drewery2017-10-311-1/+0
| | | | | | | Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=325188
* Renumber copyright clause 4Warner Losh2017-02-281-1/+1
| | | | | | | | | | | | 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 Notes: svn path=/head/; revision=314436
* Fix a regression introduced on revision r271909, when using argument -gMarcelo Araujo2016-07-051-5/+2
| | | | | | | | | | | | | or several hops we have segmentation fault because we overwrite the same structure to store information for host and gateway. Submitted by: Maryse Levavasseur <maryse.levavasseur@stormshield.eu> Reworked by: hrs Approved by: re (hrs) Differential Revision: https://reviews.freebsd.org/D6980 Notes: svn path=/head/; revision=302342
* For pointers use NULL instead of 0.Marcelo Araujo2016-05-161-1/+1
| | | | | | | MFC after: 2 weeks. Notes: svn path=/head/; revision=299875
* Use nitems() from sys/param.h.Marcelo Araujo2016-04-191-1/+1
| | | | | | | MFC after: 2 weeks. Notes: svn path=/head/; revision=298256
* Use NULL instead of 0 for pointers.Marcelo Araujo2016-04-191-1/+1
| | | | | | | | | malloc will return NULL if it cannot allocate memory. MFC after: 2 weeks. Notes: svn path=/head/; revision=298238
* Create packages for atm, ccdconfig, devd, ipf, ipfw,Glen Barber2016-02-091-0/+1
| | | | | | | | | | | iscsi, natd, nandfs, pf, quotacheck, and routed. Add ping6 and rtsol to the runtime package. Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=295448
* Use arc4random_buf(). While there, unifdef the code for HAVE_ARC4RANDOM.Xin LI2015-08-162-16/+2
| | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=286834
* Add META_MODE support.Simon J. Gerraty2015-06-131-0/+22
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Off by default, build behaves normally. WITH_META_MODE we get auto objdir creation, the ability to start build from anywhere in the tree. Still need to add real targets under targets/ to build packages. Differential Revision: D2796 Reviewed by: brooks imp Notes: svn path=/head/; revision=284345
| * dirdeps.mk now sets DEP_RELDIRSimon J. Gerraty2015-06-081-2/+0
| | | | | | | | Notes: svn path=/projects/bmake/; revision=284172
| * Merge sync of headSimon J. Gerraty2015-05-272-6/+14
| |\ | |/ |/| | | Notes: svn path=/projects/bmake/; revision=283595
| * Merge from head@274682Simon J. Gerraty2014-11-193-338/+319
| |\ | | | | | | | | | Notes: svn path=/projects/bmake/; revision=274683
| * \ Merge head from 7/28Simon J. Gerraty2014-08-191-2/+8
| |\ \ | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=270164
| * | | Updated dependenciesSimon J. Gerraty2014-05-161-1/+0
| | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=266219
| * | | Updated dependenciesSimon J. Gerraty2014-05-101-0/+2
| | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=265802
| * | | Merge from headSimon J. Gerraty2013-09-052-9/+35
| |\ \ \ | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=255263
| * | | | Updated dependenciesSimon J. Gerraty2013-03-111-0/+1
| | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=248169
| * | | | Updated dependenciesSimon J. Gerraty2013-02-161-2/+0
| | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=246868
| * | | | Sync from headSimon J. Gerraty2012-11-041-2/+4
| |\ \ \ \ | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=242545