]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
19 years agoNoticed that NetBSD's sm driver has the PSION GOLDCARD listed, so list
imp [Sat, 9 Jul 2005 01:30:32 +0000 (01:30 +0000)]
Noticed that NetBSD's sm driver has the PSION GOLDCARD listed, so list
that since I can't test it directly.  The driver also lists the EM1144
as being supported, but in reality it isn't.  The EM1144-T,
{XJ,CC}{3288,3336} have the SMC chips in them, but aren't conformant MFC
cards, so they need their own driver.

Also, it does little harm to list the 8020BT, so remove #if 0.

Approved by: re (scottl)

19 years agocorrect check for high priority wme traffic
sam [Fri, 8 Jul 2005 22:49:26 +0000 (22:49 +0000)]
correct check for high priority wme traffic

Noticed by: Ralf Assmann
Reviewed by: apatti
Approved by: re (scottl)

19 years agoSync which ggate changes.
pjd [Fri, 8 Jul 2005 21:29:17 +0000 (21:29 +0000)]
Sync which ggate changes.

Approved by: re (scottl)

19 years agoReimplement ggatec/ggated applications.
pjd [Fri, 8 Jul 2005 21:28:26 +0000 (21:28 +0000)]
Reimplement ggatec/ggated applications.

Change communication protocol to be much more resistant on network
problems and to allow for much better performance.

Better performance is achieved by creating two connections between
ggatec and ggated one for sending the data and one for receiving it.
Every connection is handled by separeted thread, so there is no more
synchronous data flow (send and wait for response), now one threads
sends all requests and another receives the data.

Use two threads in ggatec(8):
- sendtd, which takes I/O requests from the kernel and sends them to the
  ggated daemon on the other end;
- recvtd, which waits for ggated responses and forwards them to the kernel.

Use three threads in ggated(8):
- recvtd, which waits for I/O requests and puts them onto incoming queue;
- disktd, which takes requests from the incoming queue, does disk operations
  and puts finished requests onto outgoing queue;
- sendtd, which takes finished requests from the outgoing queue and sends
  responses back to ggatec.

Because there were major changes in communication protocol, there is no
backward compatibility, from now on, both client and server has to run
on 5.x or 6.x (or at least ggated should be from the same FreeBSD version
on which ggatec is running).

For Gbit networks some buffers need to be increased. I use those settings:
kern.ipc.maxsockbuf=16777216
net.inet.tcp.sendspace=8388608
net.inet.tcp.recvspace=8388608
and I use '-S 4194304 -R 4194304' options for both, ggatec and ggated.

Approved by: re (scottl)

19 years agoAdd CANCEL command which allows to remove one request from the queue or
pjd [Fri, 8 Jul 2005 21:08:53 +0000 (21:08 +0000)]
Add CANCEL command which allows to remove one request from the queue or
all requests from the queue if request number is not given.

Bump version number.

Approved by: re (scottl)

19 years agooops ... forgot to declare sc in my previous commit. unbreak build.
damien [Fri, 8 Jul 2005 19:33:42 +0000 (19:33 +0000)]
oops ... forgot to declare sc in my previous commit.  unbreak build.

Approved by: re (scottl)

19 years agofix allocation of rx dma buffers. buffers must be contiguous.
damien [Fri, 8 Jul 2005 19:30:29 +0000 (19:30 +0000)]
fix allocation of rx dma buffers.  buffers must be contiguous.

Approved by: re (scottl)

19 years agodocument ENABLE_WPA_SUPPLICANT_EAPOL
sam [Fri, 8 Jul 2005 19:26:55 +0000 (19:26 +0000)]
document ENABLE_WPA_SUPPLICANT_EAPOL

Approved by: re (scottl)

19 years agoMake sure that all the necessary USB endpoints are found during device
damien [Fri, 8 Jul 2005 19:19:06 +0000 (19:19 +0000)]
Make sure that all the necessary USB endpoints are found during device
attachment.

Reviewed by: silby (mentor)
Approved by: re (scottl)

19 years agoral_init() takes a struct ral_softc as parameter not a struct ifnet.
damien [Fri, 8 Jul 2005 19:13:49 +0000 (19:13 +0000)]
ral_init() takes a struct ral_softc as parameter not a struct ifnet.
Fixes a panic that occured when setting the interface parameters while
the interface was associated.

Approved by: re (scottl)

19 years agoUse implicit type cast for ->k_lock to fix compilation of ndis
rik [Fri, 8 Jul 2005 18:36:59 +0000 (18:36 +0000)]
Use implicit type cast for ->k_lock to fix compilation of ndis
as a part of the GENERIC kernel with INVARIANT* and WITNESS*
turned off.
(For non GENERIC kernel KTR and MUTEX_PROFILING should be also
off).

Submitted by: Eygene A. Ryabinkin <rea at rea dot mbslab dot kiae dot ru>
Approved by: re (scottl)
PR: 81767

19 years agofix another instance of the MORE_DATA bit handling for frames on the
sam [Fri, 8 Jul 2005 16:36:02 +0000 (16:36 +0000)]
fix another instance of the MORE_DATA bit handling for frames on the
power save queue (missed in previous commit)

Submitted by: Bruno Randolf
Approved by: re (scottl)

19 years agohandle RTM_IFINFO events so we terminate when an interface is
sam [Fri, 8 Jul 2005 16:33:52 +0000 (16:33 +0000)]
handle RTM_IFINFO events so we terminate when an interface is
marked down

Reviewed by: brooks, avatar
Approved by: re (scottl)

19 years agoreclaim node reference when ieee80211_encap fails
sam [Fri, 8 Jul 2005 16:31:19 +0000 (16:31 +0000)]
reclaim node reference when ieee80211_encap fails

Reviewed by: avatar
Approved by: re (scottl)

19 years agoupdate ural ids
sam [Fri, 8 Jul 2005 16:28:24 +0000 (16:28 +0000)]
update ural ids

Reviewed by: damien
Approved by: re (scottl)
Obtained from: openbsd

19 years agoRegen.
jhb [Fri, 8 Jul 2005 15:06:58 +0000 (15:06 +0000)]
Regen.

Approved by: re (scottl)

19 years agoMark second instance of lchown() MP safe just like the first.
jhb [Fri, 8 Jul 2005 15:01:13 +0000 (15:01 +0000)]
Mark second instance of lchown() MP safe just like the first.

Approved by: re (scottl)

19 years agoMissed one piece of the cluster's quirk. Need to override WARNS because
kensmith [Fri, 8 Jul 2005 14:53:45 +0000 (14:53 +0000)]
Missed one piece of the cluster's quirk.  Need to override WARNS because
if _FREEFALL_CONFIG is set gcc bails since pam_sm_setcred() in pam_krb5.c
no longer uses any of its parameters.

Pointy hat: kensmith
Approved by: re (scottl)

19 years agoMerge the following from the English version:
den [Fri, 8 Jul 2005 14:34:10 +0000 (14:34 +0000)]
Merge the following from the English version:

   1.879 -> 1.880 new.sgml

Obtained from:  The FreeBSD Russian Documentation Project
Approved by:    re (scottl)

19 years agoALTQify ste(4).
mlaier [Fri, 8 Jul 2005 13:05:59 +0000 (13:05 +0000)]
ALTQify ste(4).

Requested and tested by: <nike_d at cytexbg dot com>
Approved by: re (scottl)

19 years agoThis commit was generated by cvs2svn to compensate for changes in r147824,
obrien [Thu, 7 Jul 2005 22:06:54 +0000 (22:06 +0000)]
This commit was generated by cvs2svn to compensate for changes in r147824,
which included commits to RCS files with non-trunk default branches.

19 years agoFix bogus fmov* SPARC opcodes.
obrien [Thu, 7 Jul 2005 22:06:54 +0000 (22:06 +0000)]
Fix bogus fmov* SPARC opcodes.
(Note this makes the vendor branch not represent Binutils in the vendor's
CVS repository at any point in time.  Portmgr did not like the state of
Binutils on Sparc that represented the point in time the vendor fixed this
issue.  I'd rather have fixed this on RELENG_6.)

Approved by: re

19 years agoPatch the freebsd spec file for PowerPC so that PIC code builds correctly.
scottl [Thu, 7 Jul 2005 21:40:37 +0000 (21:40 +0000)]
Patch the freebsd spec file for PowerPC so that PIC code builds correctly.
This allows FreeBSD/PPC to build and run out of stock CVS sources.  This
also takes the file off of the vendor branch.

Submitted by: kan, grehan
Approved by: re, kan

19 years agoLock Giant around a call to userland_sysctl() in ibcs2_sysi86().
jhb [Thu, 7 Jul 2005 19:30:30 +0000 (19:30 +0000)]
Lock Giant around a call to userland_sysctl() in ibcs2_sysi86().

Approved by: re (scottl)

19 years agoRemove an extra call to read() in ibcs2_read() that can never be reached.
jhb [Thu, 7 Jul 2005 19:29:42 +0000 (19:29 +0000)]
Remove an extra call to read() in ibcs2_read() that can never be reached.
(It's already called a few lines earlier.)

Approved by: re (scottl)

19 years agoConditionally acquire Giant around the ISC and Xenix system calls based
jhb [Thu, 7 Jul 2005 19:28:55 +0000 (19:28 +0000)]
Conditionally acquire Giant around the ISC and Xenix system calls based
on the SYF_MPSAFE flag in the wrapper system calls for the ISC and Xenix
system call vectors.

Approved by: re (scottl)

19 years agoLock Giant in svr4_add_socket() so that the various svr4_*stat() calls
jhb [Thu, 7 Jul 2005 19:27:29 +0000 (19:27 +0000)]
Lock Giant in svr4_add_socket() so that the various svr4_*stat() calls
can be marked MP safe as this is the only part of them that is not
already MP safe.

Approved by: re (scottl)

19 years agoRemove an unused syscallarg() macro leftover from this code's origins in
jhb [Thu, 7 Jul 2005 19:26:43 +0000 (19:26 +0000)]
Remove an unused syscallarg() macro leftover from this code's origins in
NetBSD.

Approved by: re (scottl)

19 years agoRototill this file so that it actually compiles. It doesn't do anything
jhb [Thu, 7 Jul 2005 19:25:47 +0000 (19:25 +0000)]
Rototill this file so that it actually compiles.  It doesn't do anything
in the build still due to some #undef's in svr4.h, but if you hack around
that and add some missing entries to syscalls.master, then this file will
now compile.  The changes involved proc -> thread, using FreeBSD syscall
names instead of NetBSD, and axeing syscallarg() and retval arguments.

Approved by: re (scottl)

19 years agoFix the computation of uptime for linux_sysinfo(). Before it was returning
jhb [Thu, 7 Jul 2005 19:17:55 +0000 (19:17 +0000)]
Fix the computation of uptime for linux_sysinfo().  Before it was returning
the uptime in seconds mod 60 which wasn't very useful.

Approved by: re (scottl)

19 years ago- Remove spl's from osf1_usleep_thread().
jhb [Thu, 7 Jul 2005 19:16:30 +0000 (19:16 +0000)]
- Remove spl's from osf1_usleep_thread().
- Fix the calculation of the 'slept' timeval returned by
  osf1_usleep_thread() which has been broken since 1.1.

Approved by: re (scottl)

19 years agoRegenerate.
jhb [Thu, 7 Jul 2005 18:20:38 +0000 (18:20 +0000)]
Regenerate.

Approved by: re (scottl)

19 years ago- Add two new system calls: preadv() and pwritev() which are like readv()
jhb [Thu, 7 Jul 2005 18:17:55 +0000 (18:17 +0000)]
- Add two new system calls: preadv() and pwritev() which are like readv()
  and writev() except that they take an additional offset argument and do
  not change the current file position.  In SAT speak:
  preadv:readv::pread:read and pwritev:writev::pwrite:write.
- Try to reduce code duplication some by merging most of the old
  kern_foov() and dofilefoo() functions into new dofilefoo() functions
  that are called by kern_foov() and kern_pfoov().  The non-v functions
  now all generate a simple uio on the stack from the passed in arguments
  and then call kern_foov().  For example, read() now just builds a uio and
  calls kern_readv() and pwrite() just builds a uio and calls kern_pwritev().

PR: kern/80362
Submitted by: Marc Olzheim marcolz at stack dot nl (1)
Approved by: re (scottl)
MFC after: 1 week

19 years agoFix a bug when shell expansion is done against dangling symlinks, by
delphij [Thu, 7 Jul 2005 18:10:33 +0000 (18:10 +0000)]
Fix a bug when shell expansion is done against dangling symlinks, by
converting the stat() call to a lstat() call, which will cover the
situation.  One can exercise this bug by referring a dangling link with
something like */the-link.

Approved by: re (scottl)
Submitted by: Simon 'corecode' Schubert [corecode fs ei tum de]
Obtained from: NetBSD via DragonFlyBSD (NetBSD rev. 1.51 and DragonFly
rev. 1.6)
MFC After: 3 days

19 years agoFix ptsname(3) by converting it to use devname(3) to obtain the name of
marcus [Thu, 7 Jul 2005 17:48:40 +0000 (17:48 +0000)]
Fix ptsname(3) by converting it to use devname(3) to obtain the name of
a tty device instead of the legacy minor number approach.  This is known to
fix gnome-vfs' sftp module as well as kio_sftp and kdesu on -CURRENT.

Thanks to scottl for the snprintf() approach idea.

Reviewed by: phk
Tested by: pav
mich
Approved by: re (scottl)

19 years agoThis is sort of an MFS. Peter made these changes to the RELENG_*
kensmith [Thu, 7 Jul 2005 14:16:38 +0000 (14:16 +0000)]
This is sort of an MFS.  Peter made these changes to the RELENG_*
branches but missed HEAD.  This patch extends his a little bit,
setting it up via the Makefiles so that adding _FREEFALL_CONFIG
to /etc/make.conf is the only thing needed to cluster-ize things
(current setup also requires overriding CFLAGS).

From Peter's commit to the RELENG_* branches:
> Add the freebsd.org custer's source modifications under #ifdefs to aid
> keeping things in sync.  For ksu:
> * install suid-root by default
> * don't fall back to asking for a unix password (ie: be pure kerberos)
> * allow custom user instances for things like www and not just root

The Makefile tweaks will be MFC-ed, the rest is already done.

MFC after:      3 days
Approved by:    re (dwhite)

19 years ago - Since we don't hold a usecount in pfs_exit we have to get a holdcnt
jeff [Thu, 7 Jul 2005 07:33:10 +0000 (07:33 +0000)]
 - Since we don't hold a usecount in pfs_exit we have to get a holdcnt
   prior to calling vgone() to prevent any races.

Sponsored by: Isilon Systems, Inc.
Approved by: re (vfs blanket)

19 years ago`net.inet.ipf.fr_running' can be a negative value, which was introduced by
jkim [Thu, 7 Jul 2005 05:59:44 +0000 (05:59 +0000)]
`net.inet.ipf.fr_running' can be a negative value, which was introduced by
recent ipfilter import.

Approved by: re (scottl), anholt (mentor)

19 years agoadd myself as a new committer
jkim [Thu, 7 Jul 2005 05:48:37 +0000 (05:48 +0000)]
add myself as a new committer

Reviewed by: anholt (mentor)
Approved by: re (scottl)

19 years agoreclaim mbuf when ieee80211_crypto_encap fails
sam [Thu, 7 Jul 2005 02:55:04 +0000 (02:55 +0000)]
reclaim mbuf when ieee80211_crypto_encap fails

Approved by: re (scottl)
Obtained from: netbsd

19 years agoFix ifnet fallout in if_ti.
scottl [Thu, 7 Jul 2005 01:05:45 +0000 (01:05 +0000)]
Fix ifnet fallout in if_ti.

Reviewed by: brooks
Approved by: re

19 years agoExclude build32 target from the list of toolchain and kernel-toolchain
kan [Thu, 7 Jul 2005 00:58:41 +0000 (00:58 +0000)]
Exclude build32 target from the list of toolchain and kernel-toolchain
dependencies. We do not need to build 32bit compat tools to compile
a kernel.

Approved by: re (scottl)
Reported by: jhb

19 years agoonly invoke ath_rate_tx_complete to update rate control state when the
sam [Thu, 7 Jul 2005 00:04:50 +0000 (00:04 +0000)]
only invoke ath_rate_tx_complete to update rate control state when the
frame being sent is to be ack'd and hasn't been filtered by the h/w;
this insures we don't pass in tx descriptors that have no meaningful
state (e.g. mcast/bcast frames are not acked and so have no tx retry
counts)

Approved by: re (scottl)
Obtained from: Atheros

19 years agoThis commit was generated by cvs2svn to compensate for changes in r147801,
sam [Wed, 6 Jul 2005 22:06:27 +0000 (22:06 +0000)]
This commit was generated by cvs2svn to compensate for changes in r147801,
which included commits to RCS files with non-trunk default branches.

19 years agoclr ptr after freeing state to avoid subsequent null ptr deref
sam [Wed, 6 Jul 2005 22:06:27 +0000 (22:06 +0000)]
clr ptr after freeing state to avoid subsequent null ptr deref
(on vendor branch since this change already exists in Jouni's cvs).

Approved by: re (scottl)

19 years agoAdd support for Farallon EtherMAC PC Card.
imp [Wed, 6 Jul 2005 15:59:47 +0000 (15:59 +0000)]
Add support for Farallon EtherMAC PC Card.
Move ethernet MAC address setting into pccard attachment
Fix panic from IFP2ENADDR() use prior to if_alloc
Remove OLDCARD compat support.  This should work still on oldcard, however.
sn_attach now requires that the resources be activated now, so adjust.

Approved by: re (scottl)

19 years agoAdd device entry for a Farallon EtherMac PC Card that I won on ebay. This
imp [Wed, 6 Jul 2005 15:56:16 +0000 (15:56 +0000)]
Add device entry for a Farallon EtherMac PC Card that I won on ebay.  This
one is supported by the sn driver.

Approved by: re (scottl)

19 years agoadd pureg/-pureg parameter for controlling pureg ap mode support
sam [Wed, 6 Jul 2005 15:39:11 +0000 (15:39 +0000)]
add pureg/-pureg parameter for controlling pureg ap mode support

Reviewed by: avatar
Approved by: re (scottl)

19 years agoadd "pureg" mode for ap operation: reject association requests from
sam [Wed, 6 Jul 2005 15:38:27 +0000 (15:38 +0000)]
add "pureg" mode for ap operation: reject association requests from
11b-only stations when operating in 11g

Reviewed by: avatar
Approved by: re (scottl)

19 years agoCorrect a buffer overflow which occurred in the handling of some
cperciva [Wed, 6 Jul 2005 14:00:52 +0000 (14:00 +0000)]
Correct a buffer overflow which occurred in the handling of some
particularly corrupt deflated data streams.

Security: FreeBSD-SA-05:16.zlib
Approved by: re (security blanket)

19 years agoFix handling of data frames queued for a station in power save mode:
sam [Wed, 6 Jul 2005 01:55:17 +0000 (01:55 +0000)]
Fix handling of data frames queued for a station in power save mode:
don't mark the MORE_DATA bit when taking it off the ps queue, there's
no 802.11 header then; we must wait to do this at encap time so
mark the mbuf instead.

Reviewed by: avatar
Approved by: re (scottl)
Obtained from: Atheros

19 years agoFix race condition in handling node reference counts for authenticating
sam [Wed, 6 Jul 2005 01:51:44 +0000 (01:51 +0000)]
Fix race condition in handling node reference counts for authenticating
stations in ap mode.  Track when a node's first auth frame is
received and use this to decide whether or not to bump the refcnt.
This insures we only ever bump the refcnt once.

Reviewed by: avatar
Approved by: re (scottl)

19 years agoOnly update the scan entry state based on newly received frames.
avatar [Wed, 6 Jul 2005 01:31:34 +0000 (01:31 +0000)]
Only update the scan entry state based on newly received frames.
This fixes duplicative BSS entries(memory leaks as well) listed in
"ifconfig dev list scan" when a station fails to associate with an AP.

Reviewed by: sam
Approved by: re (scottl)

19 years ago- Previously when broadcasting to N number of interfaces we would run pfil
thompsa [Wed, 6 Jul 2005 01:24:45 +0000 (01:24 +0000)]
- Previously when broadcasting to N number of interfaces we would run pfil
  hooks for each outgoing interface but also run pfil hooks _N times_ on the
  bridge interface. This is changed so pfil hooks are run once for the bridge
  interface (bridge0) and then only on the outgoing interfaces in the broadcast
  loop.

- Simplify bridge_enqueue() by moving bridge_pfil() to the callers.

- Check (inet6_pfil_hook.ph_busy_count >= 0), it may be possible to have a
  packet filter hooked for only ipv6 but we were only checking if ipv4 hooks
  were busy.

- Minor optimisation for null mbuf check after bridge_pfil(), move it into the
  if-block as it couldnt possibly be null outside.

Prodded by: mlaier
Approved by: re (scottl), mlaier (mentor)

19 years agoEliminate MAC entry point mac_create_mbuf_from_mbuf(), which is
rwatson [Tue, 5 Jul 2005 23:39:51 +0000 (23:39 +0000)]
Eliminate MAC entry point mac_create_mbuf_from_mbuf(), which is
redundant with respect to existing mbuf copy label routines.  Expose
a new mac_copy_mbuf() routine at the top end of the Framework and
use that; use the existing mpo_copy_mbuf_label() routine on the
bottom end.

Obtained from: TrustedBSD Project
Sponsored by: SPARTA, SPAWAR
Approved by: re (scottl)

19 years agoAdd MAC Framework and MAC policy entry point mac_check_socket_create(),
rwatson [Tue, 5 Jul 2005 22:49:10 +0000 (22:49 +0000)]
Add MAC Framework and MAC policy entry point mac_check_socket_create(),
which is invoked from socket() and socketpair(), permitting MAC
policy modules to control the creation of sockets by domain, type, and
protocol.

Obtained from: TrustedBSD Project
Sponsored by: SPARTA, SPAWAR
Approved by: re (scottl)
Requested by: SCC

19 years agoRemove a || 1 that crept into the i8254 commit and was subsequently
jhb [Tue, 5 Jul 2005 20:13:12 +0000 (20:13 +0000)]
Remove a || 1 that crept into the i8254 commit and was subsequently
copied and pasted.  I had actually tested without this change in my
trees as had the other testers.

Reported by: bde, Rostislav Krasny rosti dot bsd at gmail dot com
Approved by: re (scottl)
Pointy hat to: jhb

19 years agoFix for a bug in newreno partial ack handling where if a large amount
ps [Tue, 5 Jul 2005 19:23:02 +0000 (19:23 +0000)]
Fix for a bug in newreno partial ack handling where if a large amount
of data is partial acked, snd_cwnd underflows, causing a burst.

Found, Submitted by: Noritoshi Demizu
Approved by: re

19 years agoUse the correct login class when setting a new password.
des [Tue, 5 Jul 2005 18:42:18 +0000 (18:42 +0000)]
Use the correct login class when setting a new password.

PR: 65557, 72949
Submitted by: Stephen P. Cravey <clists@gotbrains.org>
Approved by: re (scottl)
MFC after: 2 weeks

19 years agoremove auto-add of IEEE80211_KEY_GROUP; all the apps that need to
sam [Tue, 5 Jul 2005 18:05:25 +0000 (18:05 +0000)]
remove auto-add of IEEE80211_KEY_GROUP; all the apps that need to
set it have been fixed

Reviewed by: avatar
Approved by: re (scottl)

19 years agoRemove obsoleted sysctl interface for switching between standard and 3Com
glebius [Tue, 5 Jul 2005 17:51:02 +0000 (17:51 +0000)]
Remove obsoleted sysctl interface for switching between standard and 3Com
PPPoE modes. The interface was declared obsoleted before 5.3-RELEASE.

When running as access concentrator ng_pppoe(4) supports both modes
simultanously. When running as client mode can be swicthed in ppp(8)
configuration.

Approved by: re (scottl)

19 years agoexplicitly set IEEE80211_KEY_GROUP instead of depending on kernel kludge
sam [Tue, 5 Jul 2005 17:42:27 +0000 (17:42 +0000)]
explicitly set IEEE80211_KEY_GROUP instead of depending on kernel kludge

Reviewed by: avatar
Approved by: re (scottl)

19 years agoUpdate key handling:
sam [Tue, 5 Jul 2005 17:41:42 +0000 (17:41 +0000)]
Update key handling:
o use proper api for setting/deleting keys instead of depending
  on key indices
o check mac address to decide whether a key is unicast or group/global
o check set_tx on key set to decide whether a group/global key should
  also be marked as default
o explicitly set IEEE80211_KEY_GROUP flag for group keys instead of
  depending on kernel auto-add kludge

With the above changes static wep key handling works.

Reviewed by: avatar
Approved by: re (scottl)

19 years agoo when setting a wpa key, hold a ref on the bss node;
sam [Tue, 5 Jul 2005 17:35:35 +0000 (17:35 +0000)]
o when setting a wpa key, hold a ref on the bss node;
  fixes a ref cnt leak
o make unicast key handling on delete identical to set
o change legacy wep key api to reset the 802.11 state
  machine for backwards compatibility

Reviewed by: avatar
Approved by: re (scottl)

19 years agoIn the splnet times, netgraph was functional and synchronous. Nowadays,
glebius [Tue, 5 Jul 2005 17:35:20 +0000 (17:35 +0000)]
In the splnet times, netgraph was functional and synchronous. Nowadays,
an item may be queued and processed later. While this is OK for mbufs,
this is a problem for control messages.

In the framework:
- Add optional callback function pointer to an item. When item gets
  applied the callback is executed from ng_apply_item().
- Add new flag NG_PROGRESS. If this flag is supplied, then return
  EINPROGRESS instead of 0 in case if item failed to deliver
  synchronously and was queued.
- Honor NG_PROGRESS in ng_snd_item().

In ng_socket:
- When userland sends control message add callback to the item.
- If ng_snd_item() returns EINPROGRESS, then sleep.

This change fixes possible races in ngctl(8) scripts.

Reviewed by: julian
Approved by: re (scottl)

19 years agoEnhance ia64_flush_dirty() to handle the case in which td != curthread.
marcel [Tue, 5 Jul 2005 17:12:18 +0000 (17:12 +0000)]
Enhance ia64_flush_dirty() to handle the case in which td != curthread.
This case is triggered with ptrace(2) and the PT_SETREGS function.
Change the return type of the function to int so that errors can be
passed on to the caller.

Approved by: re (scottl)

19 years agoFix one "wrong b_bufobj" panic in reassignbuf() by moving VI_UNLOCK(vp)
pjd [Tue, 5 Jul 2005 15:57:55 +0000 (15:57 +0000)]
Fix one "wrong b_bufobj" panic in reassignbuf() by moving VI_UNLOCK(vp)
below KASSERT()s, which means there was no real problem here, we just
needed better locking for assertions.

OK'ed by: jeff
Approved by: re (scottl)

19 years agoUpdate for Bulletin C number 30:
phk [Tue, 5 Jul 2005 15:48:53 +0000 (15:48 +0000)]
Update for Bulletin C number 30:

There will be a leapsecond at the end of 2005.

Approved by: re@

19 years agoUpdate hardcoded postfix version number to the current postfix version
simon [Mon, 4 Jul 2005 07:53:35 +0000 (07:53 +0000)]
Update hardcoded postfix version number to the current postfix version
2.2.x.

PR: i386/82030
Prodded by: matteo
MFC after: 1 week
Approved by: re (scottl)

19 years agoHandle .Li macro's with quoted arguments, which is used in the ath(4)
simon [Mon, 4 Jul 2005 07:48:02 +0000 (07:48 +0000)]
Handle .Li macro's with quoted arguments, which is used in the ath(4)
manual page.

Noticed by: brueffer (long ago)
Approved by: re (hrs)

19 years agowhen operating in ap mode, explicitly drop associated/authenticated
sam [Mon, 4 Jul 2005 01:29:41 +0000 (01:29 +0000)]
when operating in ap mode, explicitly drop associated/authenticated
stations when transitioning to INIT state (e.g. as a result of
changing state at the 802.11 level)

Approved by: re (scottl)

19 years agoAdd support for IODATA USB-RSAQ3 USB-Serial Adapter.
hrs [Sun, 3 Jul 2005 23:51:16 +0000 (23:51 +0000)]
Add support for IODATA USB-RSAQ3 USB-Serial Adapter.

Reported by: Tomokazu Hirai
Approved by: re (scottl)
MFC after: 3 days

19 years agoCheck the alignment of the IP header before passing the packet up to the
thompsa [Sun, 3 Jul 2005 18:24:03 +0000 (18:24 +0000)]
Check the alignment of the IP header before passing the packet up to the
packet filter. This would cause a panic on architectures that require strict
alignment such as sparc64, ia64 and ppc.

This uses the code block from if_bridge and the newly added macro
IP_HDR_ALIGNED_P().

This /might/ be a temporary messure before all NIC drivers are educated
to align the header themself.

PR: ia64/81284
Obtained from: NetBSD (if_bridge)
Approved by: re (dwhite), mlaier (mentor)

19 years ago- Update the CPU version check to recognize P4/EMT64 CPUs. [1]
jkoshy [Sun, 3 Jul 2005 16:33:22 +0000 (16:33 +0000)]
- Update the CPU version check to recognize P4/EMT64 CPUs. [1]
- Allow libpmc(3) to support P4/EMT64 PMCs on the amd64 architecture
  and AMD K8 PMCs on the i386. [2]

Submitted by: ps [1]
Pointy hat: myself [2]
Approved by: re (scottl)

19 years agoRemove ambiguity from hlen. IPv4 is now indicated by is_ipv4 and we need a
mlaier [Sun, 3 Jul 2005 15:42:22 +0000 (15:42 +0000)]
Remove ambiguity from hlen.  IPv4 is now indicated by is_ipv4 and we need a
proper hlen value for IPv6 to implement O_REJECT and O_LOG.

Reviewed by: glebius, brooks, gnn
Approved by: re (scottl)

19 years agoo Make ipw(4) more robust against frames received with a bad length.
damien [Sun, 3 Jul 2005 15:42:18 +0000 (15:42 +0000)]
o Make ipw(4) more robust against frames received with a bad length.
o Minor consistency tweaks.

Reviewed by: silby (mentor)
Approved by: re (scottl)

19 years agoo Add new ids for the Belkin F5D7050
damien [Sun, 3 Jul 2005 15:38:41 +0000 (15:38 +0000)]
o Add new ids for the Belkin F5D7050
o Indent usb ids properly
o Check the return value of if_alloc()
o Call if_free() in ural_detach()

Reviewed by: silby (mentor)
Approved by: re (scottl)

19 years agoAdd another ural(4) device (Belkin F5D7050)
damien [Sun, 3 Jul 2005 15:34:32 +0000 (15:34 +0000)]
Add another ural(4) device (Belkin F5D7050)

Reviewed by: silby (mentor)
Approved by: re (scottl)

19 years agoMFi386: r1.221 (Use a simpler implementation for the i8254 timecounter).
nyan [Sun, 3 Jul 2005 14:19:29 +0000 (14:19 +0000)]
MFi386: r1.221 (Use a simpler implementation for the i8254 timecounter).

Approved by: re (scottl)

19 years agoMinor grammar fix
delphij [Sun, 3 Jul 2005 12:35:11 +0000 (12:35 +0000)]
Minor grammar fix

Submitted by: Wojciech A. Koszek [dunstan at freebsd czest pl]
Approved by: re (hrs)

19 years agoSwitch Unicode charset name from "ISO-10646-UCS-2" to "UTF-16BE".
imura [Sun, 3 Jul 2005 01:12:37 +0000 (01:12 +0000)]
Switch Unicode charset name from "ISO-10646-UCS-2" to "UTF-16BE".
Using ISO-10646-UCS-2 will cause a problem when we use our own
iconv functions in the future, or port iconv other than GNU
libiconv.

Each vendors treat "UCS-2" as follows, and endian issue is
vendor specific:

 - Solaris 8 iconv
  Little Endian with BOM

 - HP-UX iconv
  Big Endian

 - NetBSD/i386 1.6 iconv
  Little Endian

 - GNU libiconv
  Big Endian

 - glibc(RedHat AS 2.1 x86) iconv
  Little Endian

 - IANA
  Name: ISO-10646-UCS-2
  MIBenum: 1000
  Source: the 2-octet Basic Multilingual Plane, aka Unicode
          this needs to specify network byte order: the standard
          does not specify (it is a 16-bit integer space)
  Alias: csUnicode

 - MSDN
  Little Endian
  http://msdn.microsoft.com/library/en-us/cpref/html/frlrfsystemtextencodingclassgetencodingtopic2.asp

Now using UTF-16BE is harmless, because
- same as UCS-2 with 2 byte range (U+0000 - U+FFFF)
- kernel code of each file systems(cd9660, msdosfs, ntfs) believes
  Unicode is a 2 byte character at this time.
- UDF has only 2 byte range of Unicode filenames.
- It's defined at RFC2781.

So I believe it's time to change before starting new RELENG_6. :)

Approved by: re (scottl)

19 years agoImplement functions calls from within DDB on ia64. On ia64 a function
marcel [Sat, 2 Jul 2005 23:52:37 +0000 (23:52 +0000)]
Implement functions calls from within DDB on ia64. On ia64 a function
pointer doesn't point to the first instruction of that function, but
rather to a descriptor. The descriptor has the address of the first
instruction, as well as the value of the global pointer. The symbol
table doesn't know anything about descriptors, so if you lookup the
name of a function you get the address of the first instruction. The
cast from the address, which is the result of the symbol lookup, to a
function pointer as is done in db_fncall is therefore invalid.
Abstract this detail behind the DB_CALL macro. By default DB_CALL is
defined as db_fncall_generic, which yields the old behaviour. On ia64
the macro is defined as db_fncall_ia64, in which a descriptor is
constructed to yield a valid function pointer.

While here, introduce DB_MAXARGS. DB_MAXARGS replaces the existing
(local) MAXARGS. The DB_MAXARGS macro can be defined by platforms to
create a convenient maximum. By default this will be the legacy 10.
On ia64 we define this macro to be 8, for 8 is the maximum number of
arguments that can be passed in registers. This avoids having to
implement spilling of arguments on the memory stack.

Approved by: re (dwhite)

19 years agoCheck the alignment of the IP header before passing the packet up to the
thompsa [Sat, 2 Jul 2005 23:13:31 +0000 (23:13 +0000)]
Check the alignment of the IP header before passing the packet up to the
packet filter. This would cause a panic on architectures that require strict
alignment such as sparc64 (tier1) and ia64/ppc (tier2).

This adds two new macros that check the alignment, these are compile time
dependent on __NO_STRICT_ALIGNMENT which is set for i386 and amd64 where
alignment isn't need so the cost is avoided.

 IP_HDR_ALIGNED_P()
 IP6_HDR_ALIGNED_P()

Move bridge_ip_checkbasic()/bridge_ip6_checkbasic() up so that the alignment
is checked for ipfw and dummynet too.

PR: ia64/81284
Obtained from: NetBSD
Approved by: re (dwhite), mlaier (mentor)

19 years agoDon't ask about CD numbers if not installing from CD.
dwhite [Sat, 2 Jul 2005 22:34:22 +0000 (22:34 +0000)]
Don't ask about CD numbers if not installing from CD.

Approved by: re

19 years agoRemove the CPU_ENABLE_SSE option from the i386 and pc98 architectures,
delphij [Sat, 2 Jul 2005 20:06:44 +0000 (20:06 +0000)]
Remove the CPU_ENABLE_SSE option from the i386 and pc98 architectures,
as they are already default for I686_CPU for almost 3 years, and
CPU_DISABLE_SSE always disables it.  On the other hand, CPU_ENABLE_SSE
does not work for I486_CPU and I586_CPU.

This commit has:
- Removed the option from conf/options.*
- Removed the option and comments from MD NOTES files
- Simplified the CPU_ENABLE_SSE ifdef's so they don't
  deal with CPU_ENABLE_SSE from kernel configuration. (*)

For most users, this commit should be largely no-op.  If you used to
place CPU_ENABLE_SSE into your kernel configuration for some reason,
it is time to remove it.

(*) The ifdef's of CPU_ENABLE_SSE are not removed at this point, since
    we need to change it to !defined(CPU_DISABLE_SSE) && defined(I686_CPU),
    not just !defined(CPU_DISABLE_SSE), if we really want to do so.

Discussed on: -arch
Approved by: re (scottl)

19 years agoFix a buglet that was present in the ia64 code and that got inherited
marcel [Sat, 2 Jul 2005 19:57:31 +0000 (19:57 +0000)]
Fix a buglet that was present in the ia64 code and that got inherited
by amd64 and i386: For buffered writes we collect data and write it
out a ${DEV_BSIZE}-sized block at a time. The fragsz variable is used
to keep track of how much data we have collected in the buffer so far
and it's reset to zero immediately after writing a block to the dump
device.
When the last, possibly partially filled buffer is flushed, we didn't
reset fragsz to 0 and as such would stop reflecting reality. Since we
currently only need to do buffered writes once, this isn't a problem.
However, when kernel dumps are made by hand (say by callling doadump
from within DDB), the improperly cleared state from the first call to
dumpsys causes the next call to dumpsys to create an invalid code file.
This change resets fragsz after flushing the partially filled buffer so
that it fixes the two problems at once.

Approved by: re (scottl)

19 years agoAdd a missing ** to the 'command' command.
dannyboy [Sat, 2 Jul 2005 19:51:11 +0000 (19:51 +0000)]
Add a missing ** to the 'command' command.

PR: 79877
Submitted by: Kazuaki Oda <ybbkaz@yahoo.co.jp>
Reviewed by: ru
Approved by: re
MFC after: 1 day

19 years agoFix the alpha build by using the correct argument types for _kvm_kvatop().
scottl [Sat, 2 Jul 2005 05:49:29 +0000 (05:49 +0000)]
Fix the alpha build by using the correct argument types for _kvm_kvatop().

Submitted by: marcel
Approved by: re (implicit)

19 years agoFix for a bug in the change that defers sack option processing until
ps [Fri, 1 Jul 2005 22:54:18 +0000 (22:54 +0000)]
Fix for a bug in the change that defers sack option processing until
after PAWS checks. The symptom of this is an inconsistency in the cached
sack state, caused by the fact that the sack scoreboard was not being
updated for an ACK handled in the header prediction path.

Found by: Andrey Chernov.
Submitted by: Noritoshi Demizu, Raja Mukerji.
Approved by: re

19 years agoFix for a SACK crash caused by a bug in tcp_reass(). tcp_reass()
ps [Fri, 1 Jul 2005 22:52:46 +0000 (22:52 +0000)]
Fix for a SACK crash caused by a bug in tcp_reass(). tcp_reass()
does not clear tlen and frees the mbuf (leaving th pointing at
freed memory), if the data segment is a complete duplicate.
This change works around that bug. A fix for the tcp_reass() bug
will appear later (that bug is benign for now, as neither th nor
tlen is referenced in tcp_input() after the call to tcp_reass()).

Found by: Pawel Jakub Dawidek.
Submitted by: Raja Mukerji, Noritoshi Demizu.
Approved by: re

19 years agoMFi386: r1.221: use simple timecounter that is aware of irq0 being off.
peter [Fri, 1 Jul 2005 20:13:19 +0000 (20:13 +0000)]
MFi386: r1.221: use simple timecounter that is aware of irq0 being off.

Approved by:  re

19 years agoMistakingly undefined VN_KNOTE_LOCKED in my previous commit.
ssouhlal [Fri, 1 Jul 2005 17:13:59 +0000 (17:13 +0000)]
Mistakingly undefined VN_KNOTE_LOCKED in my previous commit.

Noticed by: Antoine Brodin <antoine.brodin@laposte.net>
Approved by: re (scottl)

19 years agoFix the recent panics/LORs/hangs created by my kqueue commit by:
ssouhlal [Fri, 1 Jul 2005 16:28:32 +0000 (16:28 +0000)]
Fix the recent panics/LORs/hangs created by my kqueue commit by:

- Introducing the possibility of using locks different than mutexes
for the knlist locking. In order to do this, we add three arguments to
knlist_init() to specify the functions to use to lock, unlock and
check if the lock is owned. If these arguments are NULL, we assume
mtx_lock, mtx_unlock and mtx_owned, respectively.

- Using the vnode lock for the knlist locking, when doing kqueue operations
on a vnode. This way, we don't have to lock the vnode while holding a
mutex, in filt_vfsread.

Reviewed by: jmg
Approved by: re (scottl), scottl (mentor override)
Pointyhat to: ssouhlal
Will be happy: everyone

19 years agoUpon relection, we shouldn't allow the tuple structs to be modified by
imp [Fri, 1 Jul 2005 15:52:50 +0000 (15:52 +0000)]
Upon relection, we shouldn't allow the tuple structs to be modified by
the functor, so make it a const pointer, and chase down the resulting
const-poisoning.

Approved by: re (scottl)

19 years agoUp the count of busses supported by usbd(8) from 4 to 40. With the advent
jhb [Fri, 1 Jul 2005 15:49:52 +0000 (15:49 +0000)]
Up the count of busses supported by usbd(8) from 4 to 40.  With the advent
of USB2 "duplicate" psuedo busses, it is not at all uncommon for machines
to have more than 4 USB busses nowadays.

PR: bin/81533
Submitted by: Darren Pilgrim dmp at bitfreak dot org
Approved by: re (scottl)
MFC after: 1 week

19 years agoUse a simpler implementation for the i8254 timecounter when using the lapic
jhb [Fri, 1 Jul 2005 15:47:27 +0000 (15:47 +0000)]
Use a simpler implementation for the i8254 timecounter when using the lapic
timer since irq0 isn't being driven at hz in that case and we don't need to
try to handle edge cases with rollover, etc. that require irq0 to be firing
for the timecounter to actually work.

Submitted by: phk
Tested by: schweikh
Approved by: re (scottl)

19 years agoFix what(1) on kernel binaries by duplicating part of version[] in sccs[]
jhb [Fri, 1 Jul 2005 15:43:09 +0000 (15:43 +0000)]
Fix what(1) on kernel binaries by duplicating part of version[] in sccs[]
and stop trying to play cute games so that sccs[] shares space with
version[].

Reported by: Jilles Tjoelker jilles at stack dot nl
Discussed with: bde, "R. Imura" imura at ryu16 dot org
Idea from: NetBSD (via bde)
Approved by: re (scottl)
MFC after: 1 week

19 years agoRemove the NQNFS paper.
phk [Fri, 1 Jul 2005 15:33:08 +0000 (15:33 +0000)]
Remove the NQNFS paper.

We removed the corresponding code long time ago and the historically
interested can find this paper in the cvs repo, there is no point
in installing it any more.

Approved by: re@

19 years agoUse m_uiotombuf() instead of own implementation. This is not just
glebius [Fri, 1 Jul 2005 15:22:47 +0000 (15:22 +0000)]
Use m_uiotombuf() instead of own implementation. This is not just
a cosmetic change. m_uiotombuf() produces a packet header mbuf, while
original implementation did not. When kernel is compiled with MAC
support, headerless mbuf will cause panic.

Reported by: Alexander Nikiforenko <asn rambler-co.ru>
Approved by: re (scottl)
MFC After: 2 weeks

19 years ago- Providing fine-grained malloc statistic by replacing M_DEVBUF with
avatar [Fri, 1 Jul 2005 15:21:30 +0000 (15:21 +0000)]
- Providing fine-grained malloc statistic by replacing M_DEVBUF with
  module-specific malloc types.  These should help us to pinpoint the
  possible memory leakage in the future.
- Implementing xpt_alloc_ccb_nowait() and replacing all malloc/free based
  CCB memory management with xpt_alloc_ccb[_nowait]/xpt_free_ccb.  Hopefully
  this would be helpful if someday we move the CCB allocator to use UMA
  instead of malloc().

Encouraged by: jeffr, rwatson
Reviewed by: gibbs, scottl
Approved by: re (scottl)