| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
- correct indentation
- change data types for consistency with the rest of ping.c
- create new variable separate from "answer" for clarity
|
|
|
|
|
|
|
| |
due to compiler optimization.
PR: bin/13292
Suggested by: wollman
|
| |
|
| |
|
|
|
|
| |
with this option disabled.
|
|
|
|
|
|
| |
option work as described in the manual, not as another flood ping variant.
Once discussed to death with: bde
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
Forgotten by: me
Forgotten for: Far Too Long
Gently Reminded by: Ruslan Ermilov <ru@ucb.crimea.ua>
Submitted by: Ruslan Ermilov <ru@ucb.crimea.ua>
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
| |
|
|
|
|
| |
regions properly and this triggers an unaligned access trap.
|
| |
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
string.
Translate 0 sec 1000000 usec to 1 sec 0 usec.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
working a better fix.
|
|
|
|
|
| |
PR: 6649
Submitted by: Jason Young <doogie@forbidden-donut.anet-stl.com>
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
error message prints the two numbers backwards.
PR: 6313
Reviewed by: phk
Submitted by: Archie Cobbs
|
|
|
|
| |
Submitted by: Bill Fenner
|
| |
|
|
|
|
|
| |
Theo fixed this and tqbf reported it
Obtained from: OpenBSD
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
printing the details of a received ICMP packet.
PR: bin/3766
Submitted by: denny1@home.com (Denton Gentry)
|
|
|
|
|
|
| |
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..
|
|
|
|
|
| |
Fixed minor bugs in revisions 1.12 and 1.23 (variables assigned to in signal
handlers weren't declared as volatile).
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
failed (e.g. ENOBUFS)
|
|
|
|
|
|
|
|
|
|
| |
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().
|
|
|
|
| |
Submitted by: "Philippe Charnier" <charnier@xp11.frmug.org>
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
plus other minor fixes
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.
Boy, I'm glad we're not using sup anymore. This update would have been
insane otherwise.
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
| |
that flag on every iteration of the loop. This avoids calling fprintf
inside a signal handler, which is always somewhat icky.
Reviewed by: bde
|
| |
|
|
|
|
|
|
|
| |
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
|