#
342143 |
|
16-Dec-2018 |
eugen |
MFC r341768,r341795: ping(8): remove needless comparision with LONG_MAX after unsigned long ultmp changed to long ltmp in r340245.
|
#
341714 |
|
08-Dec-2018 |
eugen |
MFC r340245: ping(8): improve diagnostics in case of wrong arguments.
For example, in case of super-user: $ sudo ping -s -64 127.0.0.1 PING 127.0.0.1 (127.0.0.1): -64 data bytes ping: sendto: Invalid argument
For unprivileged user: $ ping -s -64 127.0.0.1 ping: packet size too large: 18446744073709551552 > 56: Operation not permitted
Fix this by switching from strtoul() to strtol() for integer arguments and adding explicit checks for negative values.
|
#
331722 |
|
29-Mar-2018 |
eadler |
Revert r330897:
This was intended to be a non-functional change. It wasn't. The commit message was thus wrong. In addition it broke arm, and merged crypto related code.
Revert with prejudice.
This revert skips files touched in r316370 since that commit was since MFCed. This revert also skips files that require $FreeBSD$ property changes.
Thank you to those who helped me get out of this mess including but not limited to gonzo, kevans, rgrimes.
Requested by: gjb (re)
|
#
330897 |
|
14-Mar-2018 |
eadler |
Partial merge of the SPDX changes
These changes are incomplete but are making it difficult to determine what other changes can/should be merged.
No objections from: pfg
|
#
311936 |
|
11-Jan-2017 |
dim |
MFC r311530:
Fix clang 4.0.0 warnings about taking the address of a packed member of struct ip in ping(8):
sbin/ping/ping.c:1684:53: error: taking address of packed member 'ip_src' of class or structure 'ip' may result in an unaligned pointer value [-Werror,-Waddress-of-packed-member] (void)printf(" %s ", inet_ntoa(*(struct in_addr *)&ip->ip_src.s_addr)); ^~~~~~~~~~~~~~~~~ sbin/ping/ping.c:1685:53: error: taking address of packed member 'ip_dst' of class or structure 'ip' may result in an unaligned pointer value [-Werror,-Waddress-of-packed-member] (void)printf(" %s ", inet_ntoa(*(struct in_addr *)&ip->ip_dst.s_addr)); ^~~~~~~~~~~~~~~~~
|
#
302408 |
|
07-Jul-2016 |
gjb |
Copy head@r302406 to stable/11 as part of the 11.0-RELEASE cycle. Prune svn:mergeinfo from the new branch, as nothing has been merged here.
Additional commits post-branch will follow.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation |
#
299516 |
|
12-May-2016 |
truckman |
Check for socket creation success before calling bind().
Reported by: Coverity CID: 1194209
|
#
297027 |
|
18-Mar-2016 |
maxim |
o Restore some good whitespace killed in the previous commit.
Spotted by: bjk
|
#
297025 |
|
18-Mar-2016 |
maxim |
o Kill EoL whitespaces.
|
#
297024 |
|
18-Mar-2016 |
maxim |
o No need to resolve a mask that we get with ICMP_MASKREPLY, pass it directly to inet_ntoa(3).
|
#
296683 |
|
11-Mar-2016 |
glebius |
Allow minimum and maximum sweep size be the same.
Submitted by: maxim
|
#
296662 |
|
11-Mar-2016 |
maxim |
o Kill EoL whitespaces. No functional changes.
|
#
296047 |
|
25-Feb-2016 |
oshogbo |
Convert casperd(8) daemon to the libcasper. After calling the cap_init(3) function Casper will fork from it's original process, using pdfork(2). Forking from a process has a lot of advantages: 1. We have the same cwd as the original process. 2. The same uid, gid and groups. 3. The same MAC labels. 4. The same descriptor table. 5. The same routing table. 6. The same umask. 7. The same cpuset(1). From now services are also in form of libraries. We also removed libcapsicum at all and converts existing program using Casper to new architecture.
Discussed with: pjd, jonathan, ed, drysdale@google.com, emaste Partially reviewed by: drysdale@google.com, bdrewery Approved by: pjd (mentor) Differential Revision: https://reviews.freebsd.org/D4277
|
#
282436 |
|
04-May-2015 |
brooks |
Remove "capability mode sandbox enabled" messages.
These messages serve little purpose and break some consumers.
PR: 199855 Differential Revision: https://reviews.freebsd.org/D2440 Reviewed by: rwatson Approved by: pjd MFC after: 1 week Sponsored by: DARPA, AFRL
|
#
277562 |
|
23-Jan-2015 |
ae |
After r270929 RAW IP code assumes that all IP fields are in network byte order. Fix ping(8) to pass an IP header with converted ip_off and ip_len fields, when IP_HDRINCL socket option used.
|
#
273295 |
|
19-Oct-2014 |
hrs |
WARNS=3 and style fixes. No functionality change.
|
#
263234 |
|
16-Mar-2014 |
rwatson |
Update most userspace consumers of capability.h to use capsicum.h instead.
auditdistd is not updated as I will make the change upstream and then do a vendor import sometime in the next week or two.
MFC after: 3 weeks
|
#
261498 |
|
04-Feb-2014 |
pjd |
Protect ping(8) using Capsicum and Casper. This is protection against malicious network packets that we parse and not against local users trying to gain root access through ping's set-uid bit - this is handled by dropping privileges very early in ping.
Submitted by: Mikhail <mp@lenta.ru>
|
#
241852 |
|
22-Oct-2012 |
eadler |
Check the return error of set[ug]id. While this can never fail in the 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
|
#
237942 |
|
02-Jul-2012 |
delphij |
Use timeclear() instead of home grown version.
MFC after: 2 weeks
|
#
209366 |
|
20-Jun-2010 |
ed |
Small style fixes:
- ANSIfy prototypes. - Remove unneeded whitespace. - Add const keyword to function where it can be used.
|
#
171135 |
|
01-Jul-2007 |
gnn |
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
|
#
169833 |
|
21-May-2007 |
cognet |
Force the alignment of the chars arrays, as they are casted later to structs. gcc 4.2 doesn't do it by default, and that results in unaligned access on arm.
|
#
161273 |
|
14-Aug-2006 |
dd |
Print packet loss figures with one decimal place. ping6 already does this, and OpenBSD and NetBSD pings do it too. This is primarily useful for comparing low levels of packet loss.
|
#
157535 |
|
05-Apr-2006 |
glebius |
Add a new feature to ping(8) - possibility to specify maximum wait time for a packet. This allows to:
- Count number of packets received before and after specified time. - Shorten time of execution of 'ping -c 1' scripts.
Submitted by: Lytochkin Boris <lytboris gmail.com>
|
#
152996 |
|
01-Dec-2005 |
ru |
Sync usage() with SYNOPSIS.
|
#
149086 |
|
15-Aug-2005 |
glebius |
Implement a new feature for ping(8) - sweeping pings. In a sweeping ping ICMP payload of packets being sent is increased with given step. Sweeping pings are useful for testing problematic channels, MTU issues or traffic policing functions in networks.
PR: bin/82625 Submitted by: Chris Hellberg <chellberg juniper.net> (with some cleanups)
|
#
135957 |
|
30-Sep-2004 |
maxim |
o Store timestamp in network byte order. o Remove an assumption sizeof(struct timeval) == 8 (this is not true on sparc64).
Reviewed by: imp, -hackers Obtained from: NetBSD (rev. 1.75) MT5 after: 1 month
|
#
133723 |
|
14-Aug-2004 |
stefanf |
Avoid using void pointers in additive expressions.
PR: 56653
|
#
128073 |
|
09-Apr-2004 |
markm |
Remove advertising clause from University of California Regent's license, per letter dated July 22, 1999.
Approved by: core, imp
|
#
128015 |
|
07-Apr-2004 |
iedowse |
Don't turn off the regular SIGINFO status information. The use of the NOKERNINFO flag only marginally de-clutters the output and has a number of unwanted side effects: o The kernel info might be what you want to see o ^T is left non-functional if ping is killed non-cleanly o "ping -q foo &" gets suspended on tty output
Encouraged by: bde
|
#
125605 |
|
08-Feb-2004 |
iedowse |
Certain ICMP error replies cause ping to perform a reverse DNS lookup on an IP address from the packet (such as the IP that sent a TTL exceeded error). If the DNS lookup takes a long time, ^C will appear to be ineffective since the SIGINT handler just sets a flag and returns. Work around this by exiting immediately on receipt of a second SIGINT when DNS lookups are enabled.
PR: bin/4696 MFC after: 1 week
|
#
117550 |
|
14-Jul-2003 |
maxim |
o Rename local variables, do not shadow global declarations.
|
#
117549 |
|
14-Jul-2003 |
maxim |
o Kill MINICMPLEN, there is ICMP_MINLEN already.
|
#
117548 |
|
14-Jul-2003 |
maxim |
o Be ready to get a reply with length up to IP_MAXPACKET. o Warn when recieved packet length is not equal to length of the packet we sent out. Idea from NetBSD. o Fit the dump of packet with wrong data to 80 columns (from NetBSD).
Comments from: bde
|
#
115691 |
|
02-Jun-2003 |
maxim |
Fix SIGINFO handling: do not print incorrect timing statistics when the data for it is not available.
Founded by: ping -s0 localhost; press ^T
|
#
114589 |
|
03-May-2003 |
obrien |
Use __FBSDID() to quiet GCC 3.3 warnings.
|
#
113463 |
|
14-Apr-2003 |
maxim |
o Skip timestamp part when checking payload.
PR: bin/50909 Submitted by: Barney Wolff <barney@lab.databus.com>
|
#
113217 |
|
07-Apr-2003 |
mdodd |
Deal with a case where the returned packed was smaller than the transmitted packet (because the remote host stripped off our icmp_data).
Submitted by: Maxim Konovalov <maxim@macomnet.ru>
|
#
112985 |
|
02-Apr-2003 |
mdodd |
Back out support for RFC3514.
RFC3514 poses an unacceptale risk to compliant systems.
|
#
112980 |
|
02-Apr-2003 |
maxim |
IP_EVIL -> IP_EF
|
#
112929 |
|
01-Apr-2003 |
mdodd |
Implement support for RFC 3514 (The Security Flag in the IPv4 Header). (See: ftp://ftp.rfc-editor.org/in-notes/rfc3514.txt)
This fulfills the host requirements for userland support by way of the setsockopt() IP_EVIL_INTENT message.
There are three sysctl tunables provided to govern system behavior.
net.inet.ip.rfc3514:
Enables support for rfc3514. As this is an Informational RFC and support is not yet widespread this option is disabled by default.
net.inet.ip.hear_no_evil
If set the host will discard all received evil packets.
net.inet.ip.speak_no_evil
If set the host will discard all transmitted evil packets.
The IP statistics counter 'ips_evil' (available via 'netstat') provides information on the number of 'evil' packets recieved.
For reference, the '-E' option to 'ping' has been provided to demonstrate and test the implementation.
|
#
112729 |
|
27-Mar-2003 |
mdodd |
Default data length should be 56, not 64.
|
#
112568 |
|
24-Mar-2003 |
mdodd |
- Make -M mask and -M time exclusive. - Correct some problems with packet construction.
+--------+------------+----------+-------------+---------+ | | | | | | | IP Hdr | MINICMPLEN | phdr_len | TIMEVAL_LEN | payload | | | | | | | +--------+------------+----------+-------------+---------+ | | | | |<- IP ->|<------- ICMP -------->|<------ datalen ------>|
My previous changes tried to mess around with 'datalen' instead of modifying 'phdr_len'.
I'm including this nice ASCII diagram (from Maxim) to further clarify things in CVS history.
Submitted by: Maxim Konovalov <maxim@macomnet.ru>
|
#
112531 |
|
24-Mar-2003 |
bde |
Fixed an errx format error in rev.1.81. This should have been fatal when WARNS was increased recently, but __printf0like() has been temporarily disabled for 8 months.
Fixed related style bugs (disordered declaraction and silly type for maxpayload -- assume 16-bit ints like the rest of ping.c).
|
#
112228 |
|
14-Mar-2003 |
ru |
Demangle the usage message at the source level.
Submitted by: bde
|
#
112110 |
|
11-Mar-2003 |
ru |
Fix and sync SYNOPSIS and usage().
Prodded by: bde
|
#
111932 |
|
05-Mar-2003 |
seanc |
Update ping to be WARNS=2 compliant.
Reviewed by: -audit (no objections ~1mo) Approved by: nectar
|
#
111765 |
|
02-Mar-2003 |
mdodd |
Support ICMP_TSTAMP/ICMP_TSTAMPREPLY.
This alters the meaning of the '-M' flag.
|
#
111287 |
|
22-Feb-2003 |
ru |
Sort options.
|
#
110054 |
|
29-Jan-2003 |
mdodd |
Call fill() after maxpayload has been initialized.
Reviewed by: maxim
|
#
110009 |
|
28-Jan-2003 |
mdodd |
Send ICMP_MASKREQ packets when the '-M' option is specified.
|
#
109734 |
|
23-Jan-2003 |
maxim |
Better error handling for -s.
Submitted by: bde
Do not constantify maximum payload size. It is 65467 with -R (record route), and 65507 without it.
Reviewed by: silence on -net Proposed by: bde
I am going to MFC rev.1.77 - 1.81 ping.c and rev.1.39 and 1.40 ping.8:
MFC after: 6 months
|
#
109733 |
|
23-Jan-2003 |
maxim |
style(9) sweep.
Submitted by: bde
|
#
109732 |
|
23-Jan-2003 |
maxim |
Anti-magic: s/255/MAXTTL/
|
#
109731 |
|
23-Jan-2003 |
maxim |
Implement -D (do not fragment) and -z (TOS) options.
PR: bin/29164 Reviewed by: silence of -net Obtained from: OpenBSD
|
#
109730 |
|
23-Jan-2003 |
maxim |
Print strict source routing option.
Reviewed by: silence on -net Proposed by: David Wang <dsw@juniper.net>
|
#
105624 |
|
21-Oct-2002 |
maxim |
Fix LSRR option length check: it has to be less or equal remained header's length minus sizeof(struct ip).
MFC after: 1 week
|
#
104339 |
|
02-Oct-2002 |
dd |
Add an -o option to exit after receiving one reply. This can be used to test whether a link is live.
PR: 38573 Submitted by: David Taylor <davidt@yadt.co.uk> Obtained from: NetBSD
|
#
103229 |
|
11-Sep-2002 |
peter |
Commit "unrelated style fixes" part of Bruce's patch (regarding bcopy/memcpy) seperately.
Submitted by: bde
|
#
103227 |
|
11-Sep-2002 |
peter |
Modify previous commit to solve the real problem that made gcc think the timestamp was aligned. ie: Use a void * instead of struct timeval * which gcc assumes will be aligned. Go back to memcpy().
Submitted by: bde
|
#
103146 |
|
09-Sep-2002 |
nectar |
In reference to previous commit: use err(3).
Noticed by: bde
|
#
103129 |
|
09-Sep-2002 |
nectar |
Check for FD_SET overrun.
|
#
102471 |
|
27-Aug-2002 |
iedowse |
Add the -A flag to the usage line.
Submitted by: Yutaka KAWASE <yutaka@mailhost.net> MFC after: 3 days
|
#
101623 |
|
10-Aug-2002 |
peter |
Fix the broken "avoid unaligned data" fix. The problem is that the builtin gcc memcpy "knows" about types that are supposed to be actually already aligned and triggers alignment errors doing the memcpy itself. "Fix" this by changing it to a bcopy(). In this case, we had: struct timeval *tp; struct timeval tv1; memcpy(&tv1,tp,sizeof(tv1)); .. and since gcc *knows* that a pointer to a timeval is longword aligned and that tv1 is longword aligned, then it can use an inline that assumes alignment. The following works too: cp = (char *)tp; memcpy(&tv1,cp,sizeof(tv1)); Simply casting (char *)tp for the memcpy doesn't work. :-( This affected different 64 bit platforms in different ways and depends a lot on gcc as well. I've seen this on alpha and ia64 at least, although alpha isn't doing it right now.
|
#
99447 |
|
05-Jul-2002 |
maxim |
o Change almost all magic numbers to the appropriate constants. o Fix zero payloading, unbreak ping -s 0. o Increase socket recieve buffer, ping -s 65467 is working now.
Submitted by: anti-magic sweep based on kris's patch Reviewed by: bde, silence on -audit MFC after: 2 months
|
#
99446 |
|
05-Jul-2002 |
maxim |
More strict ip options parsing.
Reviewed by: bde (style), silence on -audit MFC after: 2 months
|
#
93643 |
|
02-Apr-2002 |
maxim |
WARNS fixes.
Submitted by: kris Reviewed by: bde Approved by: ru MFC after: 2 weeks
|
#
93638 |
|
02-Apr-2002 |
maxim |
style(9) cleanup.
Submitted by: kris (an early version of this patch) Reviewed by: bde Approved by: ru MFC after: 2 weeks
|
#
93035 |
|
23-Mar-2002 |
obrien |
Style(9) local vars after 'register' removal.
Requested by: bde
|
#
92806 |
|
20-Mar-2002 |
obrien |
Remove 'register' keyword. 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?)
|
#
91432 |
|
27-Feb-2002 |
fenner |
Use network byte order for the ICMP sequence number. This is only significant when monitoring packets on another system, since otherwise the ICMP sequence number is only used by the ping client.
|
#
89349 |
|
14-Jan-2002 |
ru |
Fixed two bugs with the "-l preload" option:
- first ping after a preload was sent undelayed - we could send more than -c packets in preload
PR: bin/32354
|
#
83940 |
|
25-Sep-2001 |
iedowse |
The -A option (beep when packets are dropped) didn't work quite right; after a single packet was dropped it beeped after every transmission.
Change its implementation to only output a bell when there is an increase in the maximum value of the number of packets that were sent but not yet received. This has the benefit that even for very long round-trip times, ping -A will do roughly the right thing after a few inital false-positives.
Reviewed by: ru
|
#
79403 |
|
07-Jul-2001 |
mjacob |
Ian Dowse writes:
The original code was certainly broken; it knows that whereto is to be used for a sockaddr_in, so it should be declared as such. To support multiple protocols, there is also a sockaddr_storage struct that can be used; I don't think struct sockaddr is supposed to be used anywhere other than for casts and pointers.
Submitted by: Ian Dowse <iedowse@maths.tcd.ie> MFC after: 3 weeks
|
#
79381 |
|
07-Jul-2001 |
mjacob |
Fix unaligned access faults on alpha.
This one is strange and goes against my rusty compiler knowledge.
The global declaration
struct sockaddr whereto;
produces for both i386 && alpha:
.comm whereto,16,1
which means common storage, byte aligned. Ahem. I though structs were supposed to be ALDOUBLE always? I mean, w/o pragma packed?
Later on, this address is coerced to:
to = (struct sockaddr_in *)&whereto;
Up until now, we've been fine on alpha because the address just ended up aligned to a 4 byte boundary. Lately, though, it end up as:
0000000120027b0f B whereto
And, tra la, you get unaligned access faults. The solution I picked, in lieu of understanding what the compiler was doing, is to put whereto as a union of a sockaddr and sockaddr_in. That's more formally correct if somewhat awkward looking.
|
#
79018 |
|
30-Jun-2001 |
rwatson |
Modify ping so that it increases the send socket buffer size if the user runs with privilege, allowing the sending of icmp packets with larger size (up to 48k, the default receive buffer size in ping), which is useful for network driver development testing, as well as experimentation with fragmentation.
Reviewed by: wpaul
|
#
77119 |
|
24-May-2001 |
phk |
Add a -A option to ping which beeps when packets are lost.
PR: 11818 Submitted by: Marc Evans marc@destek.net
|
#
74029 |
|
09-Mar-2001 |
ru |
Add new option -m which allows the user to set IP TTL.
|
#
68905 |
|
19-Nov-2000 |
kris |
Format string paranoia
|
#
58068 |
|
14-Mar-2000 |
shin |
Use CMSG_LEN() to compute ping SCM_TIMESTAMP cmsg_len. Without this, cmsg_len size should be smaller than necessary on alpha. (Though, no obvious error was seen on ping time value on beast.)
|
#
57719 |
|
03-Mar-2000 |
shin |
CMSG_XXX macros alignment fixes to follow RFC2292.
Approved by: jkh
Submitted by: Partly from tech@openbsd Reviewed by: itojun
|
#
57032 |
|
08-Feb-2000 |
shin |
ping -S option was missing from IPsec merge, so enable it again.
Approved by: jkh
Submitted by: Matthew Reimer <mreimer@vpop.net>
|
#
56342 |
|
20-Jan-2000 |
billf |
Brucify: add an upper limit to -t match the types of return values and the variables they are stuffed in make the man page and usage() a little more consistantly ugly less obfuscation.
Submitted by: adrian, billf
|
#
55996 |
|
14-Jan-2000 |
billf |
Add '-t X' which times out after pinging for X seconds.
Submitted by: adrian
|
#
55505 |
|
06-Jan-2000 |
shin |
libipsec and IPsec related apps. (and some KAME related man pages)
Reviewed by: freebsd-arch, cvs-committers Obtained from: KAME project
|
#
53369 |
|
18-Nov-1999 |
pb |
Make last commit bde-compliant: - correct indentation - change data types for consistency with the rest of ping.c - create new variable separate from "answer" for clarity
|
#
53191 |
|
15-Nov-1999 |
pb |
Fix aliasing bug causing in_cksum() to fail on odd packet sizes due to compiler optimization.
PR: bin/13292 Suggested by: wollman
|
#
50476 |
|
27-Aug-1999 |
peter |
$Id$ -> $FreeBSD$
|
#
46643 |
|
07-May-1999 |
mckay |
Make flood ping flood again. It hasn't worked since 2.2.6. Make the "-l" option work as described in the manual, not as another flood ping variant.
Once discussed to death with: bde
|
#
46080 |
|
25-Apr-1999 |
imp |
More egcs warning fixes: o main returns int not void o use braces to avoid potentially ambiguous else
Note: The fix to natd is potentially functional in nature since I used the indentation as the right thing rather than the struct semantics. Someone more familiar with the code should double check me on this one.
Reviewed by: obrien and chuckr
|
#
42337 |
|
06-Jan-1999 |
imp |
Allow PINGing from any address on multihomed hosts
In the words of the submitter: "The patch below allows to ping from any address on the multihomed host. The man page is also updated, the text was cutted from traceroute(8)."
Submitted by: Ruslan Ermilov PR: 6832
|
#
38560 |
|
26-Aug-1998 |
des |
Remove -c restrictions from previous commit.
|
#
38549 |
|
25-Aug-1998 |
dillon |
(well tested at BEST): -i option can now take FP values (e.g. -i 0.1), extremely useful for networking testing. Other options secured from user-level D.O.S. attacks. -f, -s now root-only. -i wait times < 1.0 root-only. -c count limited to 100 and defaults to 16 when ping run by non-root user.
|
#
37671 |
|
15-Jul-1998 |
charnier |
Correct use of .Nm. Remove unused #includes. Use warn(). cosmetic in usage() string. Translate 0 sec 1000000 usec to 1 sec 0 usec.
|
#
36713 |
|
06-Jun-1998 |
jb |
Fix an alignment problem on alpha by doing a bytewise copy.
|
#
36378 |
|
25-May-1998 |
fenner |
Use select() timeouts instead of SIGALRM to schedule packet transmission. Fixes bin/6649 and removes the last abusive signal handler. Use SO_TIMESTAMP to get the kernel to timestamp packets on reception. Fixes bin/5658 and provides slightly better accuracy. Explicitly zero and terminate the IP options when using -R.
PR: bin/5658 PR: bin/6649
|
#
36357 |
|
25-May-1998 |
steve |
Revert the previous fix. As it turns out Warner Losh is working a better fix.
|
#
36350 |
|
25-May-1998 |
steve |
Attempt to stop another DoS attack related to ping flooding.
PR: 6649 Submitted by: Jason Young <doogie@forbidden-donut.anet-stl.com>
|
#
36089 |
|
15-May-1998 |
jb |
When a timeval is stored at the beginning of icmp_data, the fields are unaligned for access by the alpha, so copy the value to a variable that is aligned.
When checking the returned data, be careful to avoid confusing the size of the icmp header with the size of a timeval. On i386 these are both 8, but on alpha, a timeval is 16 bytes. This means that a packet sent from an alpha contains 48 bytes of data, not 56 like on i386.
|
#
35216 |
|
15-Apr-1998 |
phk |
If ping write fails with short packet count, the error message prints the two numbers backwards. PR: 6313 Reviewed by: phk Submitted by: Archie Cobbs
|
#
34998 |
|
02-Apr-1998 |
imp |
Add aback in a line a accidentally killed in my last commit. Submitted by: Bill Fenner
|
#
34995 |
|
01-Apr-1998 |
eivind |
Make this compile (and seemingly work).
|
#
34976 |
|
31-Mar-1998 |
imp |
A fairly rare possible buffer overflow: Theo fixed this and tqbf reported it Obtained from: OpenBSD
|
#
31956 |
|
23-Dec-1997 |
imp |
Minor style nit noticed by bde.
|
#
28059 |
|
11-Aug-1997 |
fenner |
Add an ntohs() and format an IP address with inet_ntoa() when printing the details of a received ICMP packet.
PR: bin/3766 Submitted by: denny1@home.com (Denton Gentry)
|
#
27945 |
|
07-Aug-1997 |
julian |
don't lose track of how many packets we've sent if we get 'host unreachable'. (or any other errors than ENOBUFS) makes -c work again even if you can't get there.. This really needs a rework..
|
#
27533 |
|
20-Jul-1997 |
bde |
Cleaned up revisions 1.22 and 1.23. Fixed minor bugs in revisions 1.12 and 1.23 (variables assigned to in signal handlers weren't declared as volatile).
|
#
27508 |
|
18-Jul-1997 |
wollman |
Calculate and print out the standard deviation of the round trip times. This isn't necessarily the best statistic, but it is by far the easiest to calculate. Update the man page to be more explicit about precisely which statistics are printed out. Revert some of jmg's bogus man page changes from rev 1.11.
|
#
27354 |
|
13-Jul-1997 |
sef |
Fix a problem introduced with a recent change that caused a hang with unreachable hosts. Note that most of this consists of telling SIGINT and SIGALRM to interrupt the system call, instead of restarting them. Also try to get rid of some potential races Bruce didn't like; hopefully they aren't a problem (potential or otherwise) now.
Reviewed by: julian
|
#
27301 |
|
09-Jul-1997 |
julian |
don't count packets as being transmitted when we know that the sendto() failed (e.g. ENOBUFS)
|
#
27299 |
|
09-Jul-1997 |
julian |
ping called printf() from a signal handler.. this is a NO-NO
re-arange to just set a "please die immediatly" flag in the signal handler and handle this in the normal thread.
also handle ping -f better on slow links by backing off a bit when we get a ENOBUFFS from the sendto().
|
#
23385 |
|
04-Mar-1997 |
imp |
Fix typo introduced in 1.17.
Submitted by: "Philippe Charnier" <charnier@xp11.frmug.org>
|
#
23327 |
|
03-Mar-1997 |
imp |
Check the size of the IP address reutrned from gethostbyname2, per PR 2578 from Julian A. Likely not strictly needed, but it doesn't hurt and protects ping against possible buffer overflows if the resolver were to return large IP addresses.
|
#
23295 |
|
02-Mar-1997 |
imp |
1) Minor nits in the usage message from bde. I took out the hard tabs and used spaces to align the second line under the program name. 2) Cache uid after call to setuid(getuid()) so we don't waste a system call for each packet with a call to getuid for the -v case. 3) Update manual to reflect new restriction on -l from last delta.
Suggested by: bde, Bill Fenner
|
#
23251 |
|
02-Mar-1997 |
imp |
1) Fix usage to match convention and manual. Fix manual to match usage. 2) Must be root to run preload (OpenBSD ping.c 1.8) 3) Don't print all replies unless verbose and root (from idea in OpenBSD ping.c 1.10 and 1.11) to avoid leaking information available only to root. 4) Remove unused h: from option string to getopt. 5) Make the compiler happy with exit(0) (Lite-2?)
Reviewed by: Dan Cross <tenser@spitfire.ecsel.psu.edu>
Good candidate for 2.2 and 2.1 (as are many of the 1.17 changes).
|
#
23247 |
|
01-Mar-1997 |
wollman |
Make ping -Wall clean (except for one warning). Do a better job of argument parsing. Don't permit ping -f to a multicast address (very antisocial). Don't permit -L, -I, -T options with unicast addresses. Ensure that we ask for only AF_INET addresses (should close PR#2584). Return <sysexits.h> error codes for failures. Document this. Fix man page to identify the author and put sections in correct order.
|
#
22417 |
|
07-Feb-1997 |
danny |
Reviewed by: Gary Jennejohn <gj@freebsd.org> Submitted by: Bruce Murphy <packrat@iinet.net.au>
Add '-a' audible flag, so terminal will beep upon receipt of a reply packet. Useful for debugging ethernet runs, among other things.
|
#
20540 |
|
15-Dec-1996 |
fenner |
Add multicast options -I (source interface), -T (set ttl), -L (no loopback). They were all lowercase in the original, but our ping already uses -i and -l so I made them all uppercase.
Obtained from: Multicast release 3.5
|
#
20280 |
|
10-Dec-1996 |
bde |
Cleaned up recent SIGINFO changes.
Simplified average calculations. This also fixes potential overflow errors and minor rounding inconsistencies (always round to nearest now).
Don't lose more SIGINFOs than necessary.
Print \r at the start of the status message. This clears the dots that are sometimes left by ping -f.
Reviewed by: sef
|
#
20205 |
|
08-Dec-1996 |
pst |
Fix typo in last patch. empty!=emtpy
|
#
20195 |
|
07-Dec-1996 |
sef |
Change how SIGINFO is handled -- set a flag (of sig_atomic_t), and check that flag on every iteration of the loop. This avoids calling fprintf inside a signal handler, which is always somewhat icky.
Reviewed by: bde
|
#
20099 |
|
02-Dec-1996 |
fenner |
Fix math in SIGINFO printer.
|
#
19864 |
|
19-Nov-1996 |
sef |
Move the terminal handling code to a later location; this allows the signal handlers to be set up; it also means that a failed name lookup won't mess up the nokerninfo setting of the tty.
Reviewed by: pst, nate
|
#
19395 |
|
04-Nov-1996 |
bde |
Fixed backgrounding of ping, which was broken by the ^T changes in rev.1.3.
|
#
17724 |
|
20-Aug-1996 |
fenner |
Print out ICMP errors that are responses to our own packets by default. Turn this behavior off using '-Q'. This makes '-v' useless other than as an ICMP-sniffer, which tcpdump is better at anyway.
Print out another couple of ICMP messages, and fix the printing of the original packet (mostly byte order problems).
|
#
17474 |
|
09-Aug-1996 |
fenner |
Drop setuid ASAP, to minimize code executed as root.
Reviewed by: pst
|
#
17320 |
|
28-Jul-1996 |
peter |
Limit the risk of `buf' overrun in ping.c when printing hostnames.
Note, this is not really a security risk, because the buffer in question is a static variable in the data segment and not on the stack, and hence cannot subert the flow of execution in any way. About the worst case was that if you pinged a long hostname, ping could coredump.
Pointed out on: bugtraq (listserv@netspace.org)
|
#
8871 |
|
30-May-1995 |
rgrimes |
Remove trailing whitespace.
|
#
4862 |
|
29-Nov-1994 |
dg |
In past releases of FreeBSD, I have used the exit status of "ping" to determine whether a connection to a given machine is up or not.
In FreeBSD 2.0 (and therefore, I assume, BSD 4.4) the exit code of ping is always zero, even if no packets were received.
I would like to propose the following change to /usr/src/sbin/ping/ping.c to restore this useful behaviour:
Submitted by: Denis Fortin
|
#
3792 |
|
22-Oct-1994 |
sef |
Reviewed by: jkh
Print out summary information on receipt of SIGINFO; also, stop the kernel printing of information and restore it on exit. Now, it needs an option to be quiet. ;)
|
#
1859 |
|
05-Aug-1994 |
dg |
Changed output formatting to accurately represent the precision.
|
#
1559 |
|
26-May-1994 |
rgrimes |
This commit was generated by cvs2svn to compensate for changes in r1558, which included commits to RCS files with non-trunk default branches.
|
#
1558 |
|
26-May-1994 |
rgrimes |
BSD 4.4 Lite sbin Sources
Note: XNSrouted and routed NOT imported here, they shall be imported with usr.sbin.
|