Commit Graph

1888 Commits

Author SHA1 Message Date
christos 56fe2d1f4d PR/38791: J.T. Conklin: routing socket event header not cleared 2008-05-29 17:53:01 +00:00
dyoung 7b1d20d162 Delete local variable 'sockets', whose value is never used. Reported
by J.T. Conklin.
2008-05-29 17:26:56 +00:00
mrg c2b95373bf remove clause #3 from my license where there are no other
copyright holders involved.
2008-05-29 14:51:25 +00:00
dyoung d4ff34dc53 In tap_clone_destroy(), don't treat a pointer to the tap(4) softc
like it is a device_t.

In tap_clone_creator(), set cf_fstate to FSTATE_FOUND instead of
_NOTFOUND to avoid a panic in config_detach() on a DIAGNOSTIC
kernel.  XXX I'm not sure that that is the right fix.

These changes should put a stop to the crash described in kern/38759.
2008-05-28 06:28:12 +00:00
ad 5e4b324300 Properly fix the "hanging in tty" bug that was worked around with cv_wakeup()
some time again.
2008-05-25 19:22:21 +00:00
dholland b152b21d9a fix typo 2008-05-25 01:59:55 +00:00
christos 45c4cacf02 Coverity CID 5013: Add diagnostic test for bad cmd parameter. 2008-05-24 18:51:41 +00:00
dyoung 89429568e1 Add ETHER_IS_LOCAL(). Tests for "local" ethernet addresses. 2008-05-22 01:15:33 +00:00
ad 6b51302cb8 Acquire kernel_lock in tap's fileops. 2008-05-21 13:56:15 +00:00
ad 323763b5d6 Acquire kernel_lock in the bpf fileops. 2008-05-21 13:48:52 +00:00
yamt 6ddc56271b agr_ioctl_filter: comment the intention. 2008-05-19 02:53:47 +00:00
dyoung ab6934acf9 Note both my contribution and NSF funding. 2008-05-15 04:03:53 +00:00
dyoung 9fa4982002 Get rid of gre_sosend()'s lwp argument. 2008-05-15 01:30:48 +00:00
dyoung e6c098fa6e rtinit() should pass RTM_ADD to ifa->ifa_rtrequest instead of cmd,
after all.
2008-05-13 20:49:33 +00:00
dyoung e78c6441d1 Cosmetic; reduce excessive parenthesization. 2008-05-13 20:40:33 +00:00
dyoung 9efe814c6c In rtinit(), when cmd == RTM_ADD, pass cmd instead of RTM_ADD to
ifa->ifa_rtrequest(), in preparation for handling rtinit(RTM_CHANGE)
in the RTM_ADD branch.
2008-05-13 20:21:09 +00:00
dyoung 4dbd129d42 Simplify the RT_DPRINTF() calls. 2008-05-13 20:18:11 +00:00
dyoung 2d716f631f Replace a call to rtrequest() with single dst, mask, gateway
arguments, with a call to rtrequest1() with the rt_addrinfo those
single arguments come from.  No functional change intended.
2008-05-13 20:16:30 +00:00
dyoung 2f604e903b Let us call ioctl(SIOC[ADG]LIFADDR) with a link-layer address on
an AF_LINK socket, only, to be consistent with SIOC[ADG]LIFADDR
behavior on AF_INET and AF_INET6 sockets.  Let us create AF_LINK
sockets for this purpose.  Note that most operations on AF_LINK
sockets are not implemented.
2008-05-13 18:09:22 +00:00
dyoung 6f1527c315 Delete unreachable SIOCSIFADDR/AF_LINK case. 2008-05-13 17:58:52 +00:00
dyoung 4dd5ca7947 Add kernel support for adding/removing link-layer addresses using
SIOCALIFADDR AND SIOCDLIFADDR, respectively.  Corresponding
ifconfig(8) changes are coming soon.
2008-05-11 23:48:07 +00:00
dyoung 9610e6f70b Bzero, Bcmp, and Bcopy are not used any more, so delete them. 2008-05-11 20:22:38 +00:00
dyoung b9b961f930 Use memset, memmove, and memcmp instead of Bzero, Bcopy, and Bcmp,
respectively.
2008-05-11 20:14:41 +00:00
dyoung c83464af65 Where applicable, s/0/NULL/, s/Bcmp/memcmp/. Remove a gratuitous
cast from a call to nd6_storelladdr().
2008-05-11 20:13:30 +00:00
dyoung 5198e29b4c Make gre(4) work in the New File Descriptor / Socket Locking Order.
Move the function+line printing into GRE_DPRINTF().

Retire gre_closef().  Retire gre_join().  Constify gre_reconf(),
and don't pass it an LWP any longer.

Make this work in the new file descriptor regime.  Add a kernel
thread per gre(4) instance whose purpose is to install the socket
into proc0's file descriptor table.  Add gre_fp_send() and
gre_fp_recv() for passing file_t pointers to proc0.

Fix locking:  don't solock() in the socket upcall, where it is
already held.  Do solock() before calling soconnect().

Simplify reconfiguration.

Update a comment that mentions finding a less specific route, since
we don't do that any more.
2008-05-09 20:14:07 +00:00
rumble 7e3d192596 Nix a tautological return introduced in 1.129. 2008-05-09 06:08:19 +00:00
ad 2bbb14eaa4 Back out previous. It broke the build. 2008-05-05 13:41:29 +00:00
ad b407147f14 Move zlib out of net/ and into kern/. It would probably be better to use
the reachover Makefiles and libz, but this is already here and it works.
2008-05-04 23:07:09 +00:00
ad 9f4cef7b1f Don't install sys/net/zlib.h. 2008-05-04 22:58:52 +00:00
martin 592397db3f Move to standard TNF 2 clause license 2008-05-04 12:59:38 +00:00
thorpej b129a80c20 Simplify the interface to netstat_sysctl() and allocate space for
the collated counters using kmem_alloc().

PR kern/38577
2008-05-04 07:22:14 +00:00
ad 971df547a1 kern/38502 ifconfig wi0 hangs
Don't acquire the socket lock for PRU_CONTROL.
2008-04-29 18:42:26 +00:00
martin 3028e483e4 Convert to new 2 clause license 2008-04-29 06:53:00 +00:00
martin ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
yamt ee319e086d netstat_sysctl: set sysctl_size correctly. (fix netstat -s garbage output) 2008-04-26 08:17:01 +00:00
ad 6d70f903e6 Network protocol interrupts can now block on locks, so merge the globals
proclist_mutex and proclist_lock into a single adaptive mutex (proc_lock).
Implications:

- Inspecting process state requires thread context, so signals can no longer
  be sent from a hardware interrupt handler. Signal activity must be
  deferred to a soft interrupt or kthread.

- As the proc state locking is simplified, it's now safe to take exit()
  and wait() out from under kernel_lock.

- The system spends less time at IPL_SCHED, and there is less lock activity.
2008-04-24 15:35:27 +00:00
martin f9b83801e8 Make it compile if !COMPAT_OSOCK 2008-04-24 13:30:52 +00:00
ad 15e29e981b Merge the socket locking patch:
- Socket layer becomes MP safe.
- Unix protocols become MP safe.
- Allows protocol processing interrupts to safely block on locks.
- Fixes a number of race conditions.

With much feedback from matt@ and plunky@.
2008-04-24 11:38:36 +00:00
thorpej 34908fe541 Add subroutines to support collating per-cpu-gathered network statistics. 2008-04-23 05:21:17 +00:00
scw 9d52faae48 Pull in a couple of fixes from FreeBSD, the first of which addresses a
failure of wpa_supplicant(8) to re-key promptly, as reported in
http://mail-index.netbsd.org/tech-net/2008/04/18/msg000459.html

- Make bpf's read timeout work more correctly with select/poll.

- A fix for catchpacket() which delays calling bpf_wakeup() until
  the state has been updated.
2008-04-20 15:27:10 +00:00
thorpej 881a947288 Make ARP stats per-cpu. 2008-04-15 15:17:54 +00:00
thorpej 0dd41b37de Make ip6 and icmp6 stats per-cpu. 2008-04-15 03:57:04 +00:00
cegger 856327cd56 make this build with BRIDGE_IPF and PFIL_HOOKS options 2008-04-12 09:26:45 +00:00
thorpej 7ff8d08aae Make IP, TCP, UDP, and ICMP statistics per-CPU. The stats are collated
when the user requests them via sysctl.
2008-04-12 05:58:22 +00:00
dyoung 18f5f53751 Add some assertions that will catch any exception to
ro->ro_sa == NULL implies ro->_ro_rt == NULL.
2008-04-10 18:12:02 +00:00
thorpej 3f466bce48 Change IPv6 stats from a structure to an array of uint64_t's.
Note: This is ABI-compatible with the old ip6stat structure; old netstat
binaries will continue to work properly.
2008-04-08 23:37:43 +00:00
thorpej 88d65e9212 Change IP stats from a structure to an array of uint64_t's.
Note: This is ABI-compatible with the old ipstat structure; old netstat
binaries will continue to work properly.
2008-04-07 06:31:27 +00:00
cegger cc658c528f use aprint_*_dev and device_xname 2008-04-05 13:49:36 +00:00
dyoung cdb2193bda Improve error handling. gre(4) is still broken, but it does not
any longer cause a page fault trap.
2008-04-03 21:40:59 +00:00
dyoung b674c86ad6 Fix one of two bugs introduced by the descriptor handling changes
(rev 1.125): correct the check for fd_getsock() failure in
gre_socreate().

The second bug is more complicated to fix.  Since rev 1.125,
gre_reconf() is using the file descriptor table of the current
process instead of the process 0's (the kernel's).
2008-04-03 07:19:32 +00:00