Nate Lawson [Thu, 17 Jun 2004 17:27:37 +0000 (17:27 +0000)]
Revert last change. If acpi is loaded or compiled into the kernel, its
devclass will be present even if the driver was disabled by a hint. Using
device_get_softc() provides the right info even if it's overkill.
Max Laier [Thu, 17 Jun 2004 16:59:47 +0000 (16:59 +0000)]
Import two fixes from the OpenBSD stable branch:
- prevent an endless loop with route-to lo0, fixes PR 3736 (dhartmei@)
- The rule_number parameter for pf_get_pool() needs to be 32 bits, not 8 -
this fixes corruption of the address pools with large rulesets.
(mcbride@, pb@)
David E. O'Brien [Thu, 17 Jun 2004 16:08:20 +0000 (16:08 +0000)]
Commit a crude hack so we get sparc64 snapshots working again with a
stable ld.so. We need to revisit the rtld-elf/sparc64/rtld_start.S
rev. 1.5 and rtld-elf/sparc64/rtld_machdep.h rev. 1.5, which was
suppose to allow stock Binutils 2.13 (and later) to be used.
Robert Drehmel [Thu, 17 Jun 2004 10:29:12 +0000 (10:29 +0000)]
Fix a bug which occurred when the home directory given by the
-d option was equal to the one already saved and which caused
the pw utility to avoid updating values passed by other options
processed before the -d option in the code path.
Brian Feldman [Thu, 17 Jun 2004 07:29:56 +0000 (07:29 +0000)]
atapicam(4) is currently off by three orders of magnitude regarding the
timeout values in the CAM CCBs. Divide by 1000 to get values in seconds
which are what ata(4) timeouts internally use.
This does lose granularity, though, and small values can now round down
to zero. It's probably worth making all ata(4) timeouts in terms of
hz/ticks/milliseconds/something.
Tim Kientzle [Thu, 17 Jun 2004 03:09:06 +0000 (03:09 +0000)]
Always restore permissions for regular files, even if the
file already exists on disk.
Pointed out by: www/resin3 port (whose distfile contains the same file
twice with different permissions and relies on the permissions associated
with the second instance)
Thanks again to: Kris Kennaway
Doug Ambrisko [Thu, 17 Jun 2004 02:19:11 +0000 (02:19 +0000)]
While setting up a transmit packet disable interupts on the card then
re-enable them after we are done setting up the packet. This seems
to fix the MPI350 newer firmware hangs.
Max Laier [Wed, 16 Jun 2004 23:24:02 +0000 (23:24 +0000)]
Commit pf version 3.5 and link additional files to the kernel build.
Version 3.5 brings:
- Atomic commits of ruleset changes (reduce the chance of ending up in an
inconsistent state).
- A 30% reduction in the size of state table entries.
- Source-tracking (limit number of clients and states per client).
- Sticky-address (the flexibility of round-robin with the benefits of
source-hash).
- Significant improvements to interface handling.
- and many more ...
Max Laier [Wed, 16 Jun 2004 22:59:06 +0000 (22:59 +0000)]
Prepare for pf 3.5 import:
- Remove pflog and pfsync modules. Things will change in such a fashion
that there will be one module with pf+pflog that can be loaded into
GENERIC without problems (which is what most people want). pfsync is no
longer possible as a module.
- Add multicast address for in-kernel multicast pfsync protocol. Protocol
glue will follow once the import is done.
- Add one more mbuf tag
Warner Losh [Wed, 16 Jun 2004 20:27:50 +0000 (20:27 +0000)]
o Return ai_batteries as 0xffffffff instead of -1. This is a nop change, but
placates gcc which seems to like to complain about -1 being assigned to
an unsigned value. It is well defined and intended, but since signess bugs
are being hunted just change to 0xffffffff.
o Mask the lower 8 bits, not the lower 4 bits for the ai_capabilities word.
All 8 bits are defined and the 0xf was almost certainly a typo.
o Define APM_UNKNOWN to 0xff for emulation layer.
Hajimu UMEMOTO [Wed, 16 Jun 2004 16:41:23 +0000 (16:41 +0000)]
Rename variable name from `name' to `hostname'.
This is a corresponding change to bin/67994. I'll soon commit
bin/67994 into 4-STABLE. Actually, 5-CURRENT's getaddrinfo()
doesn't have the problem mentiond in bin/67994. However, it is
good to be in sync variable name with 4-STABLE and KAME.
Implement 3 new functions:
- g_lcm() - calculates Least Common Multiple of two given values,
it is helpful when we need to find sector size for provider
which is based on disks with different sector size;
- g_get_mediasize() - returns media size of given provider;
- g_get_sectorsize() - returns sector size of given provider;
Those function aren't used now, but are used by geom_mirror which will be
committed soon.
Maxim Konovalov [Wed, 16 Jun 2004 10:02:36 +0000 (10:02 +0000)]
o connect(2): if there is no a route to the destination
do not pick up the first local ip address for the source
ip address, return ENETUNREACH instead.
Bruce M Simpson [Wed, 16 Jun 2004 08:33:09 +0000 (08:33 +0000)]
In ip_forward(), when calculating the MTU in effect for an IPSEC transport
mode tunnel, take the per-route MTU into account, *if* and *only if* it
is non-zero (as found in struct rt_metrics/rt_metrics_lite).
Bruce M Simpson [Wed, 16 Jun 2004 07:00:50 +0000 (07:00 +0000)]
Make netstat(1) more closely follow documented behaviour. If a TCP
socket in LISTEN state happens to be bound to an interface, it will
show up in netstat(1) output even without the -a switch.
As the definition of "sockets used by server processes" is a
difficult one to qualify with regards to UDP, do not change the
output behaviour for UDP sockets.
Bruce M Simpson [Wed, 16 Jun 2004 06:29:41 +0000 (06:29 +0000)]
When parsing an argument as an address in getaddr(), heed the -host option
in all cases. The failure mode in the PR is easily reproducible without
this patch.
Bruce M Simpson [Wed, 16 Jun 2004 05:41:00 +0000 (05:41 +0000)]
Disconnect a temporarily-connected UDP socket in out-of-mbufs case. This
fixes the problem of UDP sockets getting wedged in a connected state (and
bound to their destination) under heavy load.
Temporary bind/connect should probably be deleted in future
as an optimization, as described in "A Faster UDP" [Partridge/Pink 1993].
Notes:
- INP_LOCK() is already held in udp_output(). The connection is in effect
happening at a layer lower than the socket layer, therefore in theory
socket locking should not be needed.
- Inlining the in_pcbdisconnect() operation buys us nothing (in the case
of the current state of the code), as laddr is not part of the
inpcb hash or the udbinfo hash. Therefore there should be no need
to rehash after restoring laddr in the error case (this was a
concern of the original author of the patch).
Bruce M Simpson [Wed, 16 Jun 2004 05:08:57 +0000 (05:08 +0000)]
Turn on RFC 1724 compliant behaviour with regards to IP_ADD_MEMBERSHIP;
routed should be able to specify multicast memberships to be added by
interface index. This should fix the unnumbered / point-to-point case
for RIPv2.
Alan Cox [Wed, 16 Jun 2004 03:11:24 +0000 (03:11 +0000)]
Correct an error in the implementation of pmap_is_prefaultable(). When I
introduced this function in revision 1.441, I inverted one of the
comparisons.
Julian Elischer [Wed, 16 Jun 2004 00:26:31 +0000 (00:26 +0000)]
Nice, is a property of a process as a whole..
I mistakenly moved it to the ksegroup when breaking up the process
structure. Put it back in the proc structure.
Peter Wemm [Tue, 15 Jun 2004 23:57:02 +0000 (23:57 +0000)]
Change strategy based on a suggestion from Ian Dowse. Instead of trying
to keep track of different section base addresses at a symbol-by-symbol
level, just set the symbol values at load time.
David Xu [Tue, 15 Jun 2004 21:46:36 +0000 (21:46 +0000)]
Avoid to touch red zone, in libpthread, ucontext may be saved by kernel's
get_mcontext, and libpthread will use signalcontext to deliver signal in
userland, it looks same as kernel's send_sig does.
Robert Watson [Tue, 15 Jun 2004 13:43:11 +0000 (13:43 +0000)]
Fill in locking annotation for additional socket fields:
so_timeo Used as a sleep/wakeup address, no locking.
sb_* Almost all socket buffer fields locked with
sockbuf lock for the oskcet buffer.
so_cred Static after socket creation.
Tim Kientzle [Tue, 15 Jun 2004 07:12:04 +0000 (07:12 +0000)]
Be a little more careful about creating directories:
* Restore directories with 0700 permissions initially,
then use the fixup pass to correct the permissions
* Trim trailing "/" and "/." in mkdirpath()