Commit Graph

165611 Commits

Author SHA1 Message Date
Bjoern A. Zeeb
fba0cea143 Add syntactic sugar missed in r226437 and then not added either when moving
things around in r226448 but desperately needed to always make things
compile successfully.

MFC after:	1 week
2011-10-17 00:05:31 +00:00
Qing Li
14417253d8 The code change made in r226040 was incomplete and resulted in
routes such as fe80::1%lo0 no being installed. This patch completes
the original intended fix.

Reviewed by:	hrs, bz
MFC after:	3 days
2011-10-16 22:24:04 +00:00
Marcel Moolenaar
ad4e66a63c Define dtrace_cmpset_long in terms of atomic_cmpset_long
and not by virtue of inline assembly. Now this file
compiles on all supported architectures.
2011-10-16 22:18:08 +00:00
Qing Li
e74eb12c68 The IPv6 code was influx at the time of r196865 due to the L2/L3
separation rewrite changes. r196865 was committed to fix a scope
violation problem in the following test scenario:

  box-1# ifconfig em0 inet6 2001:db8:1:: prefixlen 64 anycast
  box-1# ifconfig em1 inet6 2001:db8:2::1 prefixlen 64

  box-2# ifconfig re0 inet6 2001:db8:1::6 prefixlen 64

  em0 and re0 are on the same link.

  box-2# ping6 2001:db8:1::
  PING6(56=40+8+8 bytes) 2001:db8:1::6 --> 2001:db8:1::

the ICMPv6 response should have a source address of em1, which
is 2001:db8:2::1, not the link-local address of em0.

That code is no longer necessary and breaks the IPv6-Ready logo
testing, so revert it now.

Reviewed by:	hrs
MFC after:	3 days
2011-10-16 22:15:13 +00:00
Pawel Jakub Dawidek
e8cc80c0a0 In pidfile_open(), if the pidfile is locked, but empty (PID is not stored yet)
and the caller requested other process' PID by passing non-NULL pidptr
argument, we will wait at most 100ms for the PID to show up in the file and if
it won't, we will store -1 in *pidptr.

From now on, pidfile_open() function never sets errno to EAGAIN on failure.

In collaboration with:	des
MFC after:		1 week
2011-10-16 21:30:15 +00:00
Nathan Whitehorn
b6faf3cfdb Add support for special keys (volume/brightness/eject) on Apple laptops with
ADB keyboards.

Submitted by:	Justin Hibbits <jrh29 at alumni dot cwru dot edu>
MFC after:	9.0-RELEASE
2011-10-16 21:01:42 +00:00
Andre Oppermann
873789cb0f Move the tcp_sendspace and tcp_recvspace sysctl's from
the middle of tcp_usrreq.c to the top of tcp_output.c
and tcp_input.c respectively next to the socket buffer
autosizing controls.

MFC after:	1 week
2011-10-16 20:18:39 +00:00
Andre Oppermann
9ec4a4cca5 Remove the ss_fltsz and ss_fltsz_local sysctl's which have
long been superseded by the RFC3390 initial CWND sizing.

Also remove the remnants of TCP_METRICS_CWND which used the
TCP hostcache to set the initial CWND in a non-RFC compliant
way.

MFC after:	1 week
2011-10-16 20:06:44 +00:00
Hiroki Sato
154d5f7321 Fix a problem that an interface unexpectedly becomes IFF_UP by
just doing "ifconfing inet6 -ifdisabled" when the interface has
ND6_IFF_AUTO_LINKLOCAL flag and no link-local address.
2011-10-16 19:46:52 +00:00
Ed Schouten
d13b008d74 Add missing #include.
Note to myself: don't write patches while watching a movie.
2011-10-16 19:23:43 +00:00
Ed Schouten
d2ea3bed52 Don't cast SIZE_T_MAX to off_t.
I focused so much on the 32-bits case where we have to cast SIZE_T_MAX
up in size, that I forgot about the 64-bits case, where off_t and size_t
are equal in size. Simply cast both numbers to uintmax_t, as we can
assume st_size is never negative.

Reported by:	cperciva
2011-10-16 19:15:25 +00:00
Olivier Houchard
c435dafb84 Fix 2 bugs :
- A race condition could happen if two threads were using RAS at the same time
as the code didn't reset RAS_END, the RAS code could believe we were not in
a RAS, when we were in fact.
- Using signed value logic to compare addresses wasn't such a good idea.

Many thanks to Ian to investigate on these issues.

Pointy hat to: 	cognet
PR:		arm/161498
Submitted by:	Ian Lepore <freebsd At damnhippie DOT dyndns dot org
MFC after:	1 week
2011-10-16 17:59:28 +00:00
Christian Brueffer
04c4548981 Revert r226398 and instead move the allocation of usrbufs after the error check.
Suggested by:	pjd
MFC after:	1 week
2011-10-16 17:38:20 +00:00
Olivier Houchard
b3e11029a7 Explicitely set ARM_RAS_START and ARM_RAS_END once the cacheline or the
page has been allocated, or we could end up using random values, and bad things
could happen.

PR:		arm/161492
Submitted by:	Ian Lepore <freebsd AT damnhippie dot dyndns DOT org>
MFC after:	1 week
2011-10-16 17:37:54 +00:00
Olivier Houchard
10f94f86f5 Unbreak NO_DYNAMICROOT by explicitely linking to libcrypto if MK_OPENSSL isn't
set to no, as libbsnmp needs it.
2011-10-16 16:58:28 +00:00
Nathan Whitehorn
5d920ef704 Place quotes around the output of kbdmap(1), designed to be pasted into
/etc/rc.conf.

PR:		bin/161711
Submitted by:	manolis
MFC after:	1 week
2011-10-16 16:05:23 +00:00
Andre Oppermann
e233e2acb3 VNET virtualize tcp_sendspace/tcp_recvspace and change the
type to INT.  A long is not necessary as the TCP window is
limited to 2**30.  A larger initial window isn't useful.

MFC after:	1 week
2011-10-16 15:08:43 +00:00
Eitan Adler
36daf0495a - change "is is" to "is" or "it is"
- change "the the" to "the"

Approved by:	lstewart
Approved by:	sahil (mentor)
MFC after:	3 days
2011-10-16 14:30:28 +00:00
Marcel Moolenaar
80f1c58b0a Fix double vision syndrome (read: double output) when in the
debugger without a panic.
2011-10-16 14:16:46 +00:00
Marcel Moolenaar
ead616352b o Use C99 designated initializer to properly handle ELFOSABI_STANDALONE.
o  In elf_get_byte(), cast through uint8_t and not char to avoid sign
   extension.
2011-10-16 14:11:05 +00:00
Andre Oppermann
c8360ae220 Update the comment and description of tcp_sendspace and tcp_recvspace
to better reflect their purpose.
MFC after:	1 week
2011-10-16 13:54:46 +00:00
Ed Schouten
3fa417554b Forward declare mbuf and inpcb.
This fixes a compiler warning at WARNS=6 when including the header files
as follows:

	#include <sys/types.h>
	#include <netinet/in.h>
	#include <netinet/ip_var.h>
	#include <netinet/udp.h>
	#include <netinet/udp_var.h>
2011-10-16 10:58:00 +00:00
Stefan Farfeleder
0c60230835 Adjust posix_memalign() prototype to match what we define in stdlib.h for
C++ compilation.

PR:	standards/147210
2011-10-16 10:14:33 +00:00
Ed Schouten
49e3600b9c Fix ncplist to build with WARNS=6.
Add some const and static keywords to get it all to build. Also add
missing #includes.
2011-10-16 10:00:28 +00:00
Ed Schouten
7687733bfb Undo r226423.
It seems su does build without warnings, but it requires a small fix to
libbsm headers, which I have not committed to SVN yet.
2011-10-16 09:09:33 +00:00
Ed Schouten
c75216d258 Build rwho(1) with WARNS=6.
The only reason why it didn't build with WARNS=6, is because of some
simple to fix string formatting bugs.

MFC after:	3 months
2011-10-16 08:54:41 +00:00
Ed Schouten
1e47e0ca1b Change the SDP_GET* macros to cast to a const buffer.
This fixes a compiler warning when passing a const buffer to them.
2011-10-16 08:45:16 +00:00
Ed Schouten
64995097dd Change ncp_scan_bindery_object() to pass a constant search string.
The ncp_scan_bindery_object() function does not modify search_string
internally, so there is no need to declare it as `char *'.
2011-10-16 08:44:03 +00:00
Ed Schouten
03d26e9e38 Use integer to store the result of getch().
We need to use an integer to make the comparison against ERR work.

MFC after:	3 months
2011-10-16 08:36:10 +00:00
Ed Schouten
43f65c0c3c Remove WARNS line. This tool builds with WARNS=6 properly. 2011-10-16 08:14:12 +00:00
Ed Schouten
1e2070ab5b Fix build of m4 with WARNS=6.
Change the parser; rename `exp' to `exponent' not to collide with exp(3).
2011-10-16 08:09:17 +00:00
Ed Schouten
aa404b67bb Remove unneeded WARNS=3 lines.
It seems these two tools can be built properly with WARNS=6, even on
architectures that are stricter about alignment.
2011-10-16 08:04:43 +00:00
Ed Schouten
196769ee58 Build at(1) with NO_WFORMAT instead of WARNS=1. 2011-10-16 07:57:01 +00:00
Ed Schouten
73b018e38e Make some internal fixes to ruptime(1):
- Prevent possible unaligned access to struct whoent.
- Increase uptime column by one, to properly print hosts with an uptime
  greater than 1000 days.
- Reduce code complexity by storing struct whod inside struct hs.
- Set WARNS to 6.

MFC after:	3 months
2011-10-16 07:36:27 +00:00
Xin LI
d9b3a15b37 According to the NetBSD foundation [1]:
Third parties are encouraged to change the license on any files which have
a 4-clause license contributed to the NetBSD Foundation to a 2-clause
license. We would also encourage you to inform us about these files, so
that we can continue to track the many places in which NetBSD is used.

http://www.netbsd.org/about/redistribution.html#why2clause [1]

Requested by:	joel@
2011-10-16 07:35:26 +00:00
Xin LI
41cbfdc954 Partially revert r226274, the old code was right. 2011-10-16 07:05:43 +00:00
David Schultz
5d9fefacf2 Use #include "fenv.h" instead of #include <fenv.h>. This makes it
more convenient to compile the math library by itself.

Requested by:	bde
2011-10-16 05:37:56 +00:00
David Schultz
0ddbe81e4f Fix some non-standard variable declarations. 2011-10-16 05:37:20 +00:00
David Schultz
4ce31585dc Optimize the case of pure imaginary arguments. Calls like this are
common, e.g., in DFT implementations.

Discussed with:	bde, kargl
2011-10-16 05:37:01 +00:00
David Schultz
e62394861d Move the macros GET_LDBL_EXPSIGN() and SET_LDBL_EXPSIGN() into
math_private.h, so they can be used elsewhere in the math library.
2011-10-16 05:36:39 +00:00
David Schultz
eccf8b3a30 Remove an unused variable. 2011-10-16 05:36:23 +00:00
Nathan Whitehorn
007b7ee85c Enforce a memory barrier in stream operations, as is done on other
bus_space calls. This makes ath(4) work correctly on PowerPC.

Submitted by:	adrian
Tested by:	andreast
MFC after:	3 days
2011-10-15 23:15:55 +00:00
Christian Brueffer
32a1cc9317 Properly free resources in case of an error.
CID:		4222
Found with:	Coverity Prevent(tm)
MFC after:	1 week
2011-10-15 22:27:35 +00:00
Eitan Adler
acdfc36a85 - add support for I-O DATA RSA-PCI2/R
PR:		kern/142999
Submitted by:	Takefu Kenji <takefu@airport.fm>
Approved by:	jhb
Approved by:	sahil (mentor)
MFC after:	1 week
2011-10-15 21:06:08 +00:00
Mikolaj Golub
8d105928ec In r225809 the intention was to send VEOF only once if STDIN was not a
terminal. Unfortunately the fix was incorrect and for flushtime > 0 it
keept sending VEOF.

Sent VEOF generates ^D\b\b echoed by the terminal, which was reported
in bin/161526. Note, we still send VEOF at least once. Otherwise
commands like below would hang forever:

  echo 1 |script /tmp/script.out cat

PR:		bin/161526
Reported by:	Adrian Wontroba <aw1@stade.co.uk>, Stefan Bethke <stb@lassitu.de>
Tested by:	Stefan Bethke <stb@lassitu.de>
MFC after:	3 days
2011-10-15 19:08:22 +00:00
Gleb Smirnoff
53883e0c24 Add support for IPv4 /31 prefixes, as described in RFC3021.
To run a /31 network, participating hosts MUST drop support
for directed broadcasts, and treat the first and last addresses
on subnet as unicast. The broadcast address for the prefix
should be the link local broadcast address, INADDR_BROADCAST.
2011-10-15 18:41:25 +00:00
Gleb Smirnoff
b365d954cc Remove last remnants of classful addressing:
- Remove ia_net, ia_netmask, ia_netbroadcast from struct in_ifaddr.
- Remove net.inet.ip.subnetsarelocal, I bet no one need it in 2011.
- fix bug when we were not forwarding to a host which matches classful
  net address. For example router having 192.168.x.y/16 network attached,
  would not forward traffic to 192.168.*.0, which are legal IPs in
  CIDR world.
- For compatibility, leave autoguessing of mask based on class.

Reviewed by:	andre, bz, rwatson
2011-10-15 16:28:06 +00:00
Christian Brueffer
0ad684e7b4 Properly free resources in an error case.
CID:		4203
Found with:	Coverity Prevent(tm)
MFC after:	1 week
2011-10-15 15:57:55 +00:00
Ed Schouten
2bd338d6c4 Fix whitespace inconsistencies in systat(1).
According to md5(1), the resulting binary is the same.
2011-10-15 13:20:36 +00:00
Konstantin Belousov
126b36a21e Control the execution permission of the readable segments for
i386 binaries on the amd64 and ia64 with the sysctl, instead of
unconditionally enabling it.

Reviewed by:	marcel
2011-10-15 12:35:18 +00:00