| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
Reviewed by: bde (style), silence on -audit
MFC after: 2 months
|
|
|
|
|
|
|
| |
Submitted by: kris
Reviewed by: bde
Approved by: ru
MFC after: 2 weeks
|
|
|
|
|
|
|
| |
Submitted by: kris (an early version of this patch)
Reviewed by: bde
Approved by: ru
MFC after: 2 weeks
|
|
|
|
| |
Requested by: bde
|
|
|
|
|
|
| |
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?)
|
|
|
|
|
| |
significant when monitoring packets on another system, since
otherwise the ICMP sequence number is only used by the ping client.
|
|
|
|
|
|
|
| |
PR: doc/33639
Reviewed by: ru
Approved by: ru
MFC after: 1 week
|
|
|
|
|
|
|
| |
- first ping after a preload was sent undelayed
- we could send more than -c packets in preload
PR: bin/32354
|
|
|
|
|
|
| |
Binary builds that cannot handle this must explicitly set WARNS=0.
Reviewed by: mike
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
This is not "useless", as one may have non-default
setting for BINOWN in make.conf, and we still want
these to be installed setuid root in this case.
|
|
|
|
|
|
|
|
|
| |
COPTS towards the end of final CFLAGS so that it can be used to
override Makefile and other defaults. Using it in Makefiles risks
having options set using it clobbered when somebody uses it on the
command line.
Approved by: bde
|
|
|
|
|
|
|
| |
Avoid using parenthesis enclosure macros (.Pq and .Po/.Pc) with plain text.
Not only this slows down the mdoc(7) processing significantly, but it also
has an undesired (in this case) effect of disabling hyphenation within the
entire enclosed block.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
PR: 11818
Submitted by: Marc Evans marc@destek.net
|
|
|
|
| |
- MAN[1-9] -> MAN.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Without this, cmsg_len size should be smaller than necessary on alpha.
(Though, no obvious error was seen on ping time value on beast.)
|
|
|
|
|
|
|
| |
Approved by: jkh
Submitted by: Partly from tech@openbsd
Reviewed by: itojun
|
|
|
|
|
| |
of the typeset output, tend to make diffs harder to read and provide
bad examples for new-comers to mdoc.
|
|
|
|
|
|
| |
Approved by: jkh
Submitted by: Matthew Reimer <mreimer@vpop.net>
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Submitted by: adrian
|
|
|
|
| |
floppy image.
|
|
|
|
|
| |
Reviewed by: freebsd-arch, cvs-committers
Obtained from: KAME project
|
|
|
|
|
|
| |
- 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.
|
| |
|
| |
|