Commit Graph

160522 Commits

Author SHA1 Message Date
plunky 8e15db7550 not necessary to cast to (void *) (from caddr_t removal) 2007-07-19 20:48:51 +00:00
dyoung 6fcbbbc853 Take steps to hide the radix_node implementation of the forwarding table
from the forwarding table's users:

        Introduce rt_walktree() for walking the routing table and
        applying a function to each rtentry.  Replace most
        rn_walktree() calls with it.

        Use rt_getkey()/rt_setkey() to get/set a route's destination.
        Keep a pointer to the sockaddr key in the rtentry, so that
        rtentry users do not have to grovel in the radix_node for
        the key.

        Add a RTM_GET method to rtrequest.  Use that instead of
        radix_node lookups in, e.g., carp(4).

Add sys/net/link_proto.c, which supplies sockaddr routines for
link-layer socket addresses (sockaddr_dl).

Cosmetic:

        Constify.  KNF.  Stop open-coding LIST_FOREACH, TAILQ_FOREACH,
        et cetera.  Use NULL instead of 0 for null pointers.  Use
        __arraycount().  Reduce gratuitous parenthesization.

        Stop using variadic arguments for rip6_output(), it is
        unnecessary.

        Remove the unnecessary rtentry member rt_genmask and the
        code to maintain it, since nothing actually used it.

        Make rt_maskedcopy() easier to read by using meaningful variable
        names.

        Extract a subroutine intern_netmask() for looking up a netmask in
        the masks table.

        Start converting backslash-ridden IPv6 macros in
        sys/netinet6/in6_var.h into inline subroutines that one
        can read without special eyeglasses.

One functional change: when the kernel serves an RTM_GET, RTM_LOCK,
or RTM_CHANGE request, it applies the netmask (if supplied) to a
destination before searching for it in the forwarding table.

I have changed sys/netinet/ip_carp.c, carp_setroute(), to remove
the unlawful radix_node knowledge.

Apart from the changes to carp(4), netiso, ATM, and strip(4), I
have run the changes on three nodes in my wireless routing testbed,
which involves IPv4 + IPv6 dynamic routing acrobatics, and it's
working beautifully so far.
2007-07-19 20:48:50 +00:00
wiz 77bf5a1ac4 Use HTML escapes. Drop trailing whitespace. Punctuation nits. 2007-07-19 19:25:09 +00:00
pooka d5a9a344fd Initialize pnode to 0 after fetching it from the pool. At least
one effect is poll() working much better, as selinfo doesn't contain
random bits.
2007-07-19 19:04:47 +00:00
xtraeme 5ddbe8d764 sysmon_envsys_unregister: do not kmem_free(9) with the mutex held. 2007-07-19 17:06:25 +00:00
mjf 58b2412ea3 s/aprintf_normal/aprint_normal 2007-07-19 14:07:10 +00:00
gdt 7143faccbb Avoid casting to "i6addr_t *", because that type requires 64-bit
alignment and nothing guarantees that IPv6 packets in mbufs are 8-byte
aligned.  gcc was coalescing adjacent 32-bit compares into "ldx" on
sparc64, leading to alignment faults when processing icmp6 arriving on
gif with IPv4 outer addresses.

Fix mostly from darrenr@.  Discussed extensively on port-sparc64.
2007-07-19 14:04:34 +00:00
jmmv ecd360e001 sys/queue.h now requires sys/null.h, so add a compatibility header file.
Fixes build of tools under, e.g. Mac OS X.
2007-07-19 13:49:12 +00:00
mjf ce43347321 Change printf to aprintf_normal and add a newline as requested by Christoph Egger on port-xen. 2007-07-19 13:31:26 +00:00
tsutsui 0d3f4cbf60 Backout changes on lpt_jensenio.c rev 1.2.
lpt at jensenio doesn't seem to have a specific interrupt vector
but uses a normal EISA interrupt.

Fixes another part of PR port-alpha/36628 and PR port-alpha/20386.
2007-07-19 12:58:29 +00:00
pooka f2825a0ae8 Don't float puffs_kargs needlessly around after mount, saves
a couple k of memory (and there was much rejoycing!)
2007-07-19 12:52:28 +00:00
tsutsui 43c2f4d087 Avoid NULL pointer dereference in MD device_register() function.
Fixes a part of PR port-alpha/36628.
2007-07-19 12:46:45 +00:00
tsutsui 9463f365d3 Fix indent in printf message. 2007-07-19 12:42:46 +00:00
christos f65c16a601 forgot include namespace.h 2007-07-19 12:05:42 +00:00
martti a7ad55a514 s/libcrypto.so.3.1/libcrypto.so.3.2/ 2007-07-19 11:28:00 +00:00
pooka 87429c840c Oops, the cookies for nfs of course represent the *next* directory
entry offset, not the current one.
2007-07-19 10:14:53 +00:00
pooka b2a23735c5 don't request more than the maximum request size in readdir 2007-07-19 09:38:01 +00:00
hannken 8169dcee9d Update and add locking to ufs_quota:
- Replace DQ_LOCK/DQ_WANT/sleep/wakeup with a mutex `dq_interlock'.  Use this
  mutex to protect all quota values and flags.
- Protect the hashtable with a mutex.
- Never update quotas for the quota files on the same file system.  Prevents
  a deadlock when dqsync() has to change the  quota file's size (PR #13942).

Reviewed by:	Andrew Doran <ad@netbsd.org>
		Bill Stouder-Studenmund <wrstuden@netbsd.org>
2007-07-19 09:33:04 +00:00
xtraeme 502368620a sme_register_sensorname: don't forget to kmem_free(9) before returning
EEXIST.
2007-07-19 09:29:48 +00:00
pooka 0bc4555326 Make the minimum request size twice the minimum request structure size.
Otherwise ops with payload would have no room for payload.
2007-07-19 09:26:12 +00:00
pooka 044229479a wizd reminded me that if I provide the synopsis for puffs_node_seek(),
I would do well to also describe what it does.  so make it so.
2007-07-19 08:32:06 +00:00
pooka b4d2a683de -m for setting maxreqlen 2007-07-19 07:58:56 +00:00
pooka 2f6b69c368 Use ioctl(PUFFSREQSIZEOP) instead of mount(MNT_GETARGS) to fetch
the maximum request size after mount.  Calling mount(MNT_GETARGS)
from the file server is currently not kosher, as it vrele()s the
root vnode, potentially causing an inactive, which the file server
cannot handle while it itself is inactive in the kernel (deadlock).
2007-07-19 07:54:46 +00:00
pooka 09fe9d53cd define PUFFSREQSIZEOP ioctl, which can be used to fetch the
maximum request size
2007-07-19 07:52:45 +00:00
daniel 02dcfb175e Add the '-E' option to interpret regexes as extended regexes. While we
are here, fix ordering in usage information by putting '-X' in the proper
place.

Addition of '-E' was discussed on tech-userlevel.
2007-07-19 07:49:30 +00:00
pooka 638ce78980 stuff 2007-07-19 07:48:10 +00:00
lukem 9159f5b246 Support an explicit Q_error return from inquire(), which is returned
if there was an error on reading the reply.
Stops an infinite loop if you ^D the query.
2007-07-19 05:43:23 +00:00
xtraeme a71b3e13ac Apply some indent to recent changes. 2007-07-19 00:28:47 +00:00
xtraeme 9b54edd947 Maintain a SLIST per device to check for unique descriptions and do not
create any dictionary if it's duplicated. Only the first sensor that has
a unique description will be added.

Remove all elements from the list at sysmon_envsys_unregister() time and
free resources associated with it.
2007-07-19 00:12:47 +00:00
dyoung b22ec706cf Fix the kthread_create(9) call so this compiles again. 2007-07-19 00:00:09 +00:00
wiz 4213bf340c Uppercase logical OR operator. 2007-07-18 23:34:23 +00:00
mgrooms 9b7e05e155 Various racoon configuration manpage updates. 2007-07-18 22:50:47 +00:00
pooka d8a510556e get rid of DBG= 2007-07-18 22:38:58 +00:00
pooka 9651f40228 update 2007-07-18 22:23:37 +00:00
pooka ff87a004d6 Don't stay on the foreground and dump operations by default.
XXX: someone(tm) should make it possible to set PUFFS_OPFLAG_DUMP
using the fuse options framework
2007-07-18 22:05:41 +00:00
pooka 81ec5d68ec uncomment puffs_node_seek - it's supported and in use 2007-07-18 21:41:06 +00:00
pooka 46bd6a6148 puffs_cid* is always const 2007-07-18 21:24:40 +00:00
pooka e9d0d9309a kill MFSNAMELEN limit 2007-07-18 21:08:35 +00:00
xtraeme 4a393b31d2 - More changes related to locking.
- Add a condvar(9) to protect deletions on the list if there's an event
  in the worker thread.
2007-07-18 20:31:41 +00:00
xtraeme 711835b263 sme_make_dictionary: if prop_array_add() fails, don't forget to release
the dictionary. Pointed out by yamt@.
2007-07-18 20:23:10 +00:00
christos 0878f17383 PR/36665: Matthias Scheler: Thread support is not enabled in NetBSD's OpenSSL
I enabled it.
2007-07-18 20:19:56 +00:00
christos 85c806214a bump version 2007-07-18 20:17:27 +00:00
christos 9cd4e8de4b Bump minor for thread support. 2007-07-18 20:16:01 +00:00
dsl 9145137adc Fix the return value so the MNT_GETARGS returns 0, not the buffer length. 2007-07-18 20:10:47 +00:00
xtraeme fe7e9a002c - Cleanup sme_event_t: just use the struct work without any union and
remove the TAILQ.
- If prop_dictionary_set_* fails, do not release the object. The function
  calling it will release the object. Pointed out by yamt@.
2007-07-18 20:09:49 +00:00
ad 1c0f1b255b Fix fallout from recent kthread changes. 2007-07-18 19:04:58 +00:00
degroote aaae7fb8c2 Note that you need the 2.14.4 firmware now 2007-07-18 18:51:16 +00:00
degroote d1103dfaef change firmware loading code to adopt the new 2.14.4 firmware layout (from
OpenBSD).

While here, remove some dead code I added when I ported the code from OpenBSD.


IMPORTANT : You must download the 2.14.4 firmware or update your
sysutils/wpi-firmware2 to the last revision (2.14.4) or the driver will stop
working.
2007-07-18 18:49:16 +00:00
christos 8f80c199b2 remove uucp references; from Anon-Ymous 2007-07-18 18:36:57 +00:00
ad d3b878ab59 workqueue_destroy: fix a use-after-free. 2007-07-18 18:17:03 +00:00