Commit Graph

88641 Commits

Author SHA1 Message Date
dsl
f3ade04dc0 include sys/cdefs.h 2007-07-19 22:17:23 +00:00
pooka
3d29492693 add debug printf 2007-07-19 22:05:22 +00:00
dsl
cb40f24fa8 include sys/cdefs.h 2007-07-19 22:00:04 +00:00
dsl
5afdebabb4 include cdefs.h before opt_xxx.h 2007-07-19 21:54:51 +00:00
dsl
a63b2075af include cdefs.h before any opt_xxx.h 2007-07-19 21:53:15 +00:00
dyoung
08e6f22226 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:52 +00:00
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
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
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
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
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
09fe9d53cd define PUFFSREQSIZEOP ioctl, which can be used to fetch the
maximum request size
2007-07-19 07:52:45 +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
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
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
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
ad
d3b878ab59 workqueue_destroy: fix a use-after-free. 2007-07-18 18:17:03 +00:00
tsutsui
1eb143cb4c Use options<space><tab>. 2007-07-18 15:49:09 +00:00
tsutsui
b0e549dc68 - add options COMPAT_40
- use options<space><tab>
2007-07-18 15:48:49 +00:00
tsutsui
56738a1953 Just include GENERIC and use <no> keyword of config(9). 2007-07-18 15:42:41 +00:00
tsutsui
64b3321eaf Make KGDB config files just include GENERIC{,3X} and
use <no> keyword of config(9).
2007-07-18 15:35:06 +00:00
tsutsui
958c1b32fc Add options COMPAT_40. 2007-07-18 15:19:07 +00:00
briggs
883152ac0b Fix typo: mnfromname -> mntfromname. 2007-07-18 13:53:34 +00:00
tsutsui
a02017d6e7 Don't set PSL_LOWIPL to SR on switching to lwp_trampoline().
If interrupts are enabled when kernel is switched to lwp_trampoline(),
we could get lock errors by interrupts before lwp_unlock() in lwp_startup()
is called. The spl is lowered by spl0() in lwp_startup() after lwp_unlock().

Ok'ed by mhitch@ and ad@ on port-mips.
2007-07-18 13:46:46 +00:00
joerg
0ca21723a0 A number of queue(3) macros use NULL, so ensure that it is present. 2007-07-18 12:07:35 +00:00
uwe
0fbcabef5c Implement footbridge_mem_bs_mmap. Needed for mmaping igsfb(4)
framebuffer on netwinder.
2007-07-18 09:47:49 +00:00
he
971b1c1aaf After the recent mount changes, COMPAT_AOUT_M68K now depends on COMPAT_40. 2007-07-18 06:29:26 +00:00
christos
b41e460cba kill MFSNAMELEN [the definition].
Next MNAMELEN.
2007-07-17 22:17:06 +00:00
christos
c9d7b911ee Eliminate MFSNAMELEN 2007-07-17 21:26:41 +00:00
christos
785c01892b eliminate MFSNAMELEN 2007-07-17 21:20:43 +00:00
christos
3f6a396697 get rid of MFSNAMELEN 2007-07-17 21:15:41 +00:00
christos
b50aaed545 - get rid of MFSNAMELEN
- use strlcpy instead of strncpy.
- make sure some uses of statvfs strings are NUL terminated
  XXX: more work needs to be done on that.
2007-07-17 21:14:05 +00:00
christos
f25f73fe50 include <compat/sys/mount.h> for MFSNAMELEN 2007-07-17 20:54:45 +00:00
christos
9558d8b2f1 include <compat/sys/mount.h> for MFSNAMELEN. 2007-07-17 20:53:49 +00:00
christos
289334c878 include <compat/sys/mount.h> for MFSNAMELEN 2007-07-17 20:51:15 +00:00
christos
35cb28e6eb kill MFSNAMELEN 2007-07-17 20:41:23 +00:00