]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
20 years agoNew release notes: Changed some TCP tunable defaults, MSS sanity
Bruce A. Mah [Sat, 10 Jan 2004 18:10:20 +0000 (18:10 +0000)]
New release notes:  Changed some TCP tunable defaults, MSS sanity
checks and overload protection, OpenSSH 3.7.1p2.

Use digi(4) entity.

Bump copyright date.

20 years agoKeep up with sys/conf/ changes.
Ruslan Ermilov [Sat, 10 Jan 2004 18:01:08 +0000 (18:01 +0000)]
Keep up with sys/conf/ changes.

20 years agoClarify the behavior of ptrace(2) a little bit: the tracing process
Robert Watson [Sat, 10 Jan 2004 17:41:04 +0000 (17:41 +0000)]
Clarify the behavior of ptrace(2) a little bit: the tracing process
must first attach to the traced process.  If the tracing process
exits without detaching, the traced process will be killed rather
than continued.  For the duration of the tracing session, the traced
process is reparented to the tracing process (with resulting expected
behaviors).  It is permissible to trace more than one other process
at a time.  When using waitpid() to monitor the behavior of the traced
process, signals are intercepted: they may optionally then be
forwarded using ptrace().  Signals are generated normally by and for
the process, but also by the tracing facility (SIGTRAP).

Product of: Suffering
Sponsored by: DARPA, AFRL

20 years agoMore unparenthesized return values.
Dag-Erling Smørgrav [Sat, 10 Jan 2004 17:14:53 +0000 (17:14 +0000)]
More unparenthesized return values.

20 years agoMoved the code for :U and :L modifiers where it belongs, so that
Ruslan Ermilov [Sat, 10 Jan 2004 16:30:29 +0000 (16:30 +0000)]
Moved the code for :U and :L modifiers where it belongs, so that
the fallback for SysV (now in POSIX) variable substitution works
for old_string arguments starting with 'U' or 'L'.

20 years agoProperly fix the FreeBSD copyright.
Ruslan Ermilov [Sat, 10 Jan 2004 16:24:22 +0000 (16:24 +0000)]
Properly fix the FreeBSD copyright.

Pointed by: scottl

20 years agoWe need to discard `const'ness explicitly when invoking sysarch.
Jacques Vidrine [Sat, 10 Jan 2004 15:57:06 +0000 (15:57 +0000)]
We need to discard `const'ness explicitly when invoking sysarch.

Reported by: sparc64 tinderbox via bde

20 years agos/FreeBSD Inc./The FreeBSD Foundation/g
Ruslan Ermilov [Sat, 10 Jan 2004 15:38:47 +0000 (15:38 +0000)]
s/FreeBSD Inc./The FreeBSD Foundation/g

20 years agoAdd manual page links from fsck_ufs.8 and fsck_4.2bsd.8 to fsck_ffs.8,
Simon L. B. Nielsen [Sat, 10 Jan 2004 14:36:49 +0000 (14:36 +0000)]
Add manual page links from fsck_ufs.8 and fsck_4.2bsd.8 to fsck_ffs.8,
since there are already the same links for the program binary.

Suggested by: mat

20 years agoFix serious ugliness introduced in 1.61, which leads to long delay in boot
Maxim Sobolev [Sat, 10 Jan 2004 13:09:21 +0000 (13:09 +0000)]
Fix serious ugliness introduced in 1.61, which leads to long delay in boot
sequence when machine is started without attached USB mouse. Only do
repeated attempts to re-open device if the usb module has been actually
loaded. Also fix broken logic in doing delays between open attempts - do
delays between attempts, not after each attempt.

Due to previous behaviour being very annoying for notebook owners this
is a good 5.2 MFC candidate.

MFC after: 2 days

20 years agoStyle: parenthesize return values.
Dag-Erling Smørgrav [Sat, 10 Jan 2004 13:03:43 +0000 (13:03 +0000)]
Style: parenthesize return values.

20 years agotry rtinit() only when the route is not installed.
Hajimu UMEMOTO [Sat, 10 Jan 2004 08:59:21 +0000 (08:59 +0000)]
try rtinit() only when the route is not installed.
this allows, e.g., duplicated attempts of 'ifconfig lo0 ::1'
like for IPv4.

Obtained from: KAME
MFC after: 1 week

20 years agoCheck that sa_len is the appropriate value in tcp_usr_bind(),
Don Lewis [Sat, 10 Jan 2004 08:53:00 +0000 (08:53 +0000)]
Check that sa_len is the appropriate value in tcp_usr_bind(),
tcp6_usr_bind(), tcp_usr_connect(), and tcp6_usr_connect() before checking
to see whether the address is multicast so that the proper errno value
will be returned if sa_len is incorrect.  The checks are identical to the
ones in in_pcbbind_setup(), in6_pcbbind(), and in6_pcbladdr(), which are
called after the multicast address check passes.

MFC after: 30 days

20 years agoAdd a somewhat redundant check on the len arguement to getsockaddr() to
Don Lewis [Sat, 10 Jan 2004 08:28:54 +0000 (08:28 +0000)]
Add a somewhat redundant check on the len arguement to getsockaddr() to
avoid relying on the minimum memory allocation size to avoid problems.
The check is somewhat redundant because the consumers of the returned
structure will check that sa_len is a protocol-specific larger size.

Submitted by: Matthew Dillon <dillon@apollo.backplane.com>
Reviewed by: nectar
MFC after: 30 days

20 years agoDon't execute the code in in6_ifdetach() that removes the link-local
Don Lewis [Sat, 10 Jan 2004 08:14:27 +0000 (08:14 +0000)]
Don't execute the code in in6_ifdetach() that removes the link-local
allnodes multicast route if the routing table has not been initialized.
This avoids a panic during boot if an interface detaches before the
routing table is initialized.

Submitted by: sam

20 years agoin set{peer, sock}addr, do not convert the unspecified
Hajimu UMEMOTO [Sat, 10 Jan 2004 08:11:51 +0000 (08:11 +0000)]
in set{peer, sock}addr, do not convert the unspecified
address (::) to the mapped address form.

PR: kern/22868
Obtained from: KAME
MFC after: 3 days

20 years agoRestore closing of SMB find handle in smbfs_close().
Tim J. Robbins [Sat, 10 Jan 2004 03:45:30 +0000 (03:45 +0000)]
Restore closing of SMB find handle in smbfs_close().

20 years agoRemove the HACK section it breaks the older firmware and doesn't totally
Doug Ambrisko [Sat, 10 Jan 2004 03:02:04 +0000 (03:02 +0000)]
Remove the HACK section it breaks the older firmware and doesn't totally
fix the new firmware so remove it.

20 years agoFix a panic when attempting a v4 op against a v3/v2-only server.
Alfred Perlstein [Sat, 10 Jan 2004 02:59:54 +0000 (02:59 +0000)]
Fix a panic when attempting a v4 op against a v3/v2-only server.
It happens because rpcclnt_request is incorrectly returning 0 in the case
of an rpc mismatch or auth error.

Submitted by: Jim Rees <rees@umich.edu>

20 years agoUnmanage pages allocated by kmem_alloc(). (There is no point in having PV
Alan Cox [Sat, 10 Jan 2004 00:22:33 +0000 (00:22 +0000)]
Unmanage pages allocated by kmem_alloc().  (There is no point in having PV
entries for these pages.)

20 years agoPrevent a race condition between fork1() and whatever changes the pgrp by
Olivier Houchard [Fri, 9 Jan 2004 23:42:36 +0000 (23:42 +0000)]
Prevent a race condition between fork1() and whatever changes the pgrp by
setting the new process' p_pgrp again before inserting it in the p_pglist.
Without it we can get the new process to be inserted in a different p_pglist
than the one p2->p_pgrp points to, and this is not something we want to happen.
This is not a fix, merely a bandaid, but it will work until someone finds a
better way to do it.

Discussed with:  jhb (a long time ago)

20 years agoRemove duplicate __FBSDID().
Olivier Houchard [Fri, 9 Jan 2004 23:30:31 +0000 (23:30 +0000)]
Remove duplicate __FBSDID().
Mark trm as depending on cam.

20 years agoChange sdp_open_local(3) API. It now takes a path to a control socket
Maksim Yevmenkin [Fri, 9 Jan 2004 22:44:28 +0000 (22:44 +0000)]
Change sdp_open_local(3) API. It now takes a path to a control socket
Teach sdpcontrol(8) how to talk to the local SDP server
Update man pages
s/u_int/uint

Reviewed by: imp (mentor), ru

20 years agoMove the description of sbuf_delete() closer to the description of
Dag-Erling Smørgrav [Fri, 9 Jan 2004 21:16:31 +0000 (21:16 +0000)]
Move the description of sbuf_delete() closer to the description of
sbuf_new(), and try to make them both a little clearer.

20 years agoClean up the acpi announce message of trailing spaces.
Nate Lawson [Fri, 9 Jan 2004 21:04:28 +0000 (21:04 +0000)]
Clean up the acpi announce message of trailing spaces.

20 years agoAdd missing manual page links for rman(9) and sysctl_add_oid(9).
Simon L. B. Nielsen [Fri, 9 Jan 2004 20:15:51 +0000 (20:15 +0000)]
Add missing manual page links for rman(9) and sysctl_add_oid(9).

Submitted by: Lukas Ertl <l.ertl@univie.ac.at>
PR: docs/60088

20 years agoFirst 5.2-RELEASE errata, documenting some known issues in the
Bruce A. Mah [Fri, 9 Jan 2004 20:10:20 +0000 (20:10 +0000)]
First 5.2-RELEASE errata, documenting some known issues in the
release: xdm(1) black-and-white-ness, ACPI problems, ATA device
problems, NFS floppy install requirements, pcm(4) vchan instabilities.

Submitted by: scottl, truckman

20 years agoUpdate man page for \_OS* changes.
Nate Lawson [Fri, 9 Jan 2004 20:06:04 +0000 (20:06 +0000)]
Update man page for \_OS* changes.

20 years agoExpand the check for overriding the OS name to override _OS* (including
Nate Lawson [Fri, 9 Jan 2004 20:01:42 +0000 (20:01 +0000)]
Expand the check for overriding the OS name to override _OS* (including
_OS_, _OS, and _OSI).  This should fix this option for people who reported
it not changing anything.

20 years agoNote that REPORT_LUNS should be implemented to work better with Linux
Nate Lawson [Fri, 9 Jan 2004 19:33:21 +0000 (19:33 +0000)]
Note that REPORT_LUNS should be implemented to work better with Linux
and Windows as initiators.

20 years agoEnable autosense by default. This shouldn't hurt SPI and is required
Nate Lawson [Fri, 9 Jan 2004 19:27:18 +0000 (19:27 +0000)]
Enable autosense by default.  This shouldn't hurt SPI and is required
for FC.

20 years agoBump the max number of initiators to 256 from 16. This is appropriate for
Nate Lawson [Fri, 9 Jan 2004 19:26:30 +0000 (19:26 +0000)]
Bump the max number of initiators to 256 from 16.  This is appropriate for
fibre channel and shouldn't hurt SPI.

20 years agoDisable the APIC when selecting the 'Safe Mode' option of the loader. This
Scott Long [Fri, 9 Jan 2004 19:20:47 +0000 (19:20 +0000)]
Disable the APIC when selecting the 'Safe Mode' option of the loader.  This
will disable both APIC interrupt routing and SMP.

20 years agoPrepare libsdp(3) for the upcoming sdpd import
Maksim Yevmenkin [Fri, 9 Jan 2004 18:19:12 +0000 (18:19 +0000)]
Prepare libsdp(3) for the upcoming sdpd import
Also while i'm here s/u_int/uint

Reviewed by: imp (mentor), ru

20 years agoAdd MLINK:
Christian Brueffer [Fri, 9 Jan 2004 17:55:48 +0000 (17:55 +0000)]
Add MLINK:

ndis.4 -> if_ndis.4

20 years agoCorrect typo in MLINK
Christian Brueffer [Fri, 9 Jan 2004 17:49:03 +0000 (17:49 +0000)]
Correct typo in MLINK

20 years agoAdd reference to miibus.4
Christian Brueffer [Fri, 9 Jan 2004 17:43:37 +0000 (17:43 +0000)]
Add reference to miibus.4

MFC after: 5 days

20 years agodevice uhci0 -> device uhci
Christian Brueffer [Fri, 9 Jan 2004 17:39:08 +0000 (17:39 +0000)]
device uhci0 -> device uhci

Remove reference to miibus.4, the driver doesn't use it.

MFC after: 5 days

20 years agokue(4) doesn't use miibus either
Christian Brueffer [Fri, 9 Jan 2004 17:31:33 +0000 (17:31 +0000)]
kue(4) doesn't use miibus either

MFC after: 5 days

20 years agoRemove drivers that don't need miibus(4):
Christian Brueffer [Fri, 9 Jan 2004 17:17:57 +0000 (17:17 +0000)]
Remove drivers that don't need miibus(4):
o an
o awi

Add missing drivers:
o axe
o bfe
o gx
o lge
o nge
o re
o sk

MFC after: 5 days

20 years agoProvide sysarch(2) prototypes in the MD sysarch.h headers. While I'm
Jacques Vidrine [Fri, 9 Jan 2004 16:52:09 +0000 (16:52 +0000)]
Provide sysarch(2) prototypes in the MD sysarch.h headers.  While I'm
at it, use the ANSI C generic pointer type for the second argument,
thus matching the documentation.

Remove the now extraneous (and now conflicting) function declarations
in various libc sources.  Remove now unnecessary casts.

Reviewed by: bde

20 years agoKASSERT against no-op access requests.
Poul-Henning Kamp [Fri, 9 Jan 2004 16:10:32 +0000 (16:10 +0000)]
KASSERT against no-op access requests.

Submitted by: Pawel Jakub Dawidek <nick@garage.freebsd.pl>

20 years ago- Add the HP hn210e to the devices list.
Simon L. B. Nielsen [Fri, 9 Jan 2004 15:47:54 +0000 (15:47 +0000)]
- Add the HP hn210e to the devices list.
- Make the device list compact.

MFC after: 1 week

20 years agoRe-add the FreeBSD RCS keyword for the benefit of mergemaster.
Jacques Vidrine [Fri, 9 Jan 2004 14:46:11 +0000 (14:46 +0000)]
Re-add the FreeBSD RCS keyword for the benefit of mergemaster.

PR: conf/50040
Requested by: Dimitry Andric <dim@xs4all.nl>

20 years agoReduce TCP_MINMSS default to 216. The AX.25 protocol (packet radio)
Andre Oppermann [Fri, 9 Jan 2004 14:14:10 +0000 (14:14 +0000)]
Reduce TCP_MINMSS default to 216.  The AX.25 protocol (packet radio)
is frequently used with an MTU of 256 because of slow speeds and a
high packet loss rate.

20 years agoIt was reported that when using nss_ldap, getgrent(3) would behave
Jacques Vidrine [Fri, 9 Jan 2004 13:43:49 +0000 (13:43 +0000)]
It was reported that when using nss_ldap, getgrent(3) would behave
incorrectly when encountering `large' groups (many members and/or many
long member names).  The reporter tracked this down to the glibc NSS
module compatibility code (nss_compat.c): it would prematurely record
that a NSS module was finished iterating through its database in some
cases.

Two aspects are corrected:

1. nss_compat.c recorded that a NSS module was finished iterating
   whenever the module reported something other than SUCCESS.  The
   correct logic is to continue iteration when the module reports
   either SUCCESS or RETURN.  The __nss_compat_getgrent_r and
   __nss_compat_getpwent_r routines are updated to reflect this.

2. An internal helper macro __nss_compat_result is used to map glibc
   NSS status codes to BSD NSS status codes (e.g. NSS_STATUS_SUCCESS ->
   NS_SUCCESS).  It provided the obvious mapping.

   When a NSS routine is called with a too-small buffer, the
   convention in the BSD NSS code is to report RETURN.  (This is used
   to implement reentrant APIs such as getpwnam_r(3).)  However, the
   convention in glibc for this case is to set errno = ERANGE and
   overload TRYAGAIN.  __nss_compat_result is updated to handle this
   case.

PR: bin/60287
Reported by: Lachlan O'Dea <odela01@ca.com>

20 years agoThis commit was generated by cvs2svn to compensate for changes in r124287,
Dag-Erling Smørgrav [Fri, 9 Jan 2004 12:57:36 +0000 (12:57 +0000)]
This commit was generated by cvs2svn to compensate for changes in r124287,
which included commits to RCS files with non-trunk default branches.

20 years agoDon't output the terminating '\0' (already fixed in OpenSSH CVS)
Dag-Erling Smørgrav [Fri, 9 Jan 2004 12:57:36 +0000 (12:57 +0000)]
Don't output the terminating '\0' (already fixed in OpenSSH CVS)

20 years agoFix a warning when NATM is not defined. In this case s is not used.
Hartmut Brandt [Fri, 9 Jan 2004 11:25:14 +0000 (11:25 +0000)]
Fix a warning when NATM is not defined. In this case s is not used.

20 years agoEgg on my face: UsePAM was off by default.
Dag-Erling Smørgrav [Fri, 9 Jan 2004 08:07:12 +0000 (08:07 +0000)]
Egg on my face: UsePAM was off by default.

Pointed out by: Sean McNeil <sean@mcneil.com>

20 years agoThe private data section of ndis_packets has a 'packet flags' byte
Bill Paul [Fri, 9 Jan 2004 06:53:49 +0000 (06:53 +0000)]
The private data section of ndis_packets has a 'packet flags' byte
which has two important flags in it: the 'allocated by NDIS' flag
and the 'media specific info present' flag. There are two Windows macros
for getting/setting media specific info fields within the ndis_packet
structure which can behave improperly if these flags are not initialized
correctly when a packet is allocated. It seems the correct thing
to do is always set the NDIS_PACKET_ALLOCATED_BY_NDIS flag on
all newly allocated packets.

This fixes the crashes with the Intel Centrino wireless driver.
My sample card now seems to work correctly.

Also, fix a potential LOR involving ndis_txeof() in if_ndis.c.

20 years agoSync with Creative's 8010.h rev 1.51.
David E. O'Brien [Fri, 9 Jan 2004 06:38:11 +0000 (06:38 +0000)]
Sync with Creative's 8010.h rev 1.51.

20 years agoDike out some very Linux-specific parts that we can't compile with.
David E. O'Brien [Fri, 9 Jan 2004 05:08:32 +0000 (05:08 +0000)]
Dike out some very Linux-specific parts that we can't compile with.
Also protect AC97_MUTE which is also defined in our own ac97.h.

20 years agoThis commit was generated by cvs2svn to compensate for changes in r124273,
David E. O'Brien [Fri, 9 Jan 2004 05:05:04 +0000 (05:05 +0000)]
This commit was generated by cvs2svn to compensate for changes in r124273,
which included commits to RCS files with non-trunk default branches.

20 years agoVendor import revision 1.9 of ac97_codec.h (we renamed the file) from
David E. O'Brien [Fri, 9 Jan 2004 05:05:04 +0000 (05:05 +0000)]
Vendor import revision 1.9 of ac97_codec.h (we renamed the file) from
http://cvs.sourceforge.net/viewcvs.py/emu10k1/emu10k1/ac97_codec.h

20 years agoImplement NdisOpenFile()/NdisCloseFile()/NdisMapFile()/NdisUnmapFile().
Bill Paul [Fri, 9 Jan 2004 03:57:00 +0000 (03:57 +0000)]
Implement NdisOpenFile()/NdisCloseFile()/NdisMapFile()/NdisUnmapFile().
By default, we search for files in /compat/ndis. This can be changed with
a systcl. These routines are used by some drivers which need to download
firmware or microcode into their respective devices during initialization.

Also, remove extraneous newlines from the 'built-in' sysctl/registry
variables.

20 years agoAdd a GraphViz-exporting ngctl(8) "dot" command. You can now create
Brian Feldman [Fri, 9 Jan 2004 03:19:40 +0000 (03:19 +0000)]
Add a GraphViz-exporting ngctl(8) "dot" command.  You can now create
very useful .dot files of your netgraph(4) to quickly visualize the
nodes, hooks and edges.  An example of this can be found here:
http://people.freebsd.org/~green/sample-netgraph-dot.ps
If anyone would like to refine the output further, please do so.

20 years agoAlso, don't crash in the netgraph disconnect node if the interface is
Brian Feldman [Fri, 9 Jan 2004 02:03:24 +0000 (02:03 +0000)]
Also, don't crash in the netgraph disconnect node if the interface is
detached from the other direction.

20 years agoDon't try to ifpromisc() on an interface that's deleted already.
Brian Feldman [Fri, 9 Jan 2004 00:41:45 +0000 (00:41 +0000)]
Don't try to ifpromisc() on an interface that's deleted already.

20 years agoImprove the expressiveness of ttyinfo (^T) when dealing with threads
Robert Watson [Thu, 8 Jan 2004 22:49:23 +0000 (22:49 +0000)]
Improve the expressiveness of ttyinfo (^T) when dealing with threads
in slightly less usual states:

  If the thread is on a run queue, display "running" if the thread is
  actually running, otherwise, "runnable".

  If the thread is sleeping, and it's on a sleep queue, display the
  name of the queue, otherwise "unknown" -- previously, in this situation
  we would display "iowait".

  If the thread is waiting on a lock, display *lockname.

  If the thread is suspended, display "suspended" -- previously, in
  this situation we would display "iowait".

  If the thread is waiting for an interrupt, display "intrwait" --
  previously, in this situation we would display "iowait".

  If the thread is in a state not handled by the above, display
  "unknown" -- previously, we would print "iowait".

Among other things, this avoids displaying "iowait" when the foreground
process turns out to be suspended waiting for a debugger to properly
attach.

20 years agoDrop the sigacts mutex around calls to stopevent() to avoid sleeping
Robert Watson [Thu, 8 Jan 2004 22:44:54 +0000 (22:44 +0000)]
Drop the sigacts mutex around calls to stopevent() to avoid sleeping
holding the mutex.  Because the sigacts pointer can't change while
the process is "live" (proc locking (x)), we know our pointer is still
valid.

In communication with: truckman
Reviewed by: jhb

20 years agoDo not emit comments when -n is specified.
Poul-Henning Kamp [Thu, 8 Jan 2004 22:21:45 +0000 (22:21 +0000)]
Do not emit comments when -n is specified.

20 years ago - Enable recursive acquisition of the mutex synchronizing access to the
Alan Cox [Thu, 8 Jan 2004 20:48:26 +0000 (20:48 +0000)]
 - Enable recursive acquisition of the mutex synchronizing access to the
   free pages queue.  This is presently needed by contigmalloc1().
 - Move a sanity check against attempted double allocation of two pages
   to the same vm object offset from vm_page_alloc() to vm_page_insert().
   This provides better protection because double allocation could occur
   through a direct call to vm_page_insert(), such as that by
   vm_page_rename().
 - Modify contigmalloc1() to hold the mutex synchronizing access to the
   free pages queue while it scans vm_page_array in search of free pages.
 - Correct a potential leak of pages by contigmalloc1() that I introduced
   in revision 1.20: We must convert all cache queue pages to free pages
   before we begin removing free pages from the free queue.  Otherwise,
   if we have to restart the scan because we are unable to acquire the
   vm object lock that is necessary to convert a cache queue page to a
   free page, we leak those free pages already removed from the free queue.

20 years agoUse the saved params for LBA-CHS conversion. Fixes PC98 bug.
Søren Schmidt [Thu, 8 Jan 2004 19:17:16 +0000 (19:17 +0000)]
Use the saved params for LBA-CHS conversion. Fixes PC98 bug.

20 years agoSome integrated Davicom cards in sparc64 boxes have an all zeros
Maxime Henrion [Thu, 8 Jan 2004 19:08:27 +0000 (19:08 +0000)]
Some integrated Davicom cards in sparc64 boxes have an all zeros
MAC address in the EEPROM, and we need to get it from OpenFirmware.
This isn't very pretty but time is lacking to do this in a better
way this near 5.2-RELEASE.  This is a RELENG_5_2 candidate.

Original version by: Marius Strobl <marius@alchemy.franken.de>
Tested by: Pete Bentley <pete@sorted.org>
Reviewed by: jake

20 years agoLimiters and sanity checks for TCP MSS (maximum segement size)
Andre Oppermann [Thu, 8 Jan 2004 17:40:07 +0000 (17:40 +0000)]
Limiters and sanity checks for TCP MSS (maximum segement size)
resource exhaustion attacks.

For network link optimization TCP can adjust its MSS and thus
packet size according to the observed path MTU.  This is done
dynamically based on feedback from the remote host and network
components along the packet path.  This information can be
abused to pretend an extremely low path MTU.

The resource exhaustion works in two ways:

 o during tcp connection setup the advertized local MSS is
   exchanged between the endpoints.  The remote endpoint can
   set this arbitrarily low (except for a minimum MTU of 64
   octets enforced in the BSD code).  When the local host is
   sending data it is forced to send many small IP packets
   instead of a large one.

   For example instead of the normal TCP payload size of 1448
   it forces TCP payload size of 12 (MTU 64) and thus we have
   a 120 times increase in workload and packets. On fast links
   this quickly saturates the local CPU and may also hit pps
   processing limites of network components along the path.

   This type of attack is particularly effective for servers
   where the attacker can download large files (WWW and FTP).

   We mitigate it by enforcing a minimum MTU settable by sysctl
   net.inet.tcp.minmss defaulting to 256 octets.

 o the local host is reveiving data on a TCP connection from
   the remote host.  The local host has no control over the
   packet size the remote host is sending.  The remote host
   may chose to do what is described in the first attack and
   send the data in packets with an TCP payload of at least
   one byte.  For each packet the tcp_input() function will
   be entered, the packet is processed and a sowakeup() is
   signalled to the connected process.

   For example an attack with 2 Mbit/s gives 4716 packets per
   second and the same amount of sowakeup()s to the process
   (and context switches).

   This type of attack is particularly effective for servers
   where the attacker can upload large amounts of data.
   Normally this is the case with WWW server where large POSTs
   can be made.

   We mitigate this by calculating the average MSS payload per
   second.  If it goes below 'net.inet.tcp.minmss' and the pps
   rate is above 'net.inet.tcp.minmssoverload' defaulting to
   1000 this particular TCP connection is resetted and dropped.

MITRE CVE: CAN-2004-0002
Reviewed by: sam (mentor)
MFC after: 1 day

20 years agoAdd the PCI ID for yet another bge chip: the Altima 1002.
Bill Paul [Thu, 8 Jan 2004 17:19:11 +0000 (17:19 +0000)]
Add the PCI ID for yet another bge chip: the Altima 1002.

Submitted by: Pavel Gubin <pg@rainbow.ie.tusur.ru>

20 years agoAdd the NDISAPI option.
Bill Paul [Thu, 8 Jan 2004 17:13:10 +0000 (17:13 +0000)]
Add the NDISAPI option.

20 years agoAlways clean all files, including ones under ACPI_DEBUG when doing a
Nate Lawson [Thu, 8 Jan 2004 16:38:32 +0000 (16:38 +0000)]
Always clean all files, including ones under ACPI_DEBUG when doing a
"make clean".

20 years agoMFlibpthread: Add a simple work-around for deadlocking on recursive
Daniel Eischen [Thu, 8 Jan 2004 15:39:12 +0000 (15:39 +0000)]
MFlibpthread: Add a simple work-around for deadlocking on recursive
              readlocks on a rwlock while there are writers waiting.

20 years agoAdd a simple work-around for deadlocking on recursive read locks
Daniel Eischen [Thu, 8 Jan 2004 15:37:09 +0000 (15:37 +0000)]
Add a simple work-around for deadlocking on recursive read locks
on a rwlock while there are writers waiting.  We normally favor
writers but when a reader already has at least one other read lock,
we favor the reader.  We don't track all the rwlocks owned by a
thread, nor all the threads that own a rwlock -- we just keep
a count of all the read locks owned by a thread.

PR: 24641

20 years ago* firewire
Hidetoshi Shimokawa [Thu, 8 Jan 2004 14:58:09 +0000 (14:58 +0000)]
* firewire
Add tcode_str[] and improve debug message.
* sbp
If max_speed is negative, use the maximum speed which the
ohci chip supports.  The default max_speed is -1.
* if_fwe
If tx_speed is negative, use the maximum speed which the
ohci chip supports.  The default tx_speed is 2.

20 years agoCosmetics: rearrange the dependency list to match that of ssh and sshd.
Ruslan Ermilov [Thu, 8 Jan 2004 11:41:02 +0000 (11:41 +0000)]
Cosmetics: rearrange the dependency list to match that of ssh and sshd.

Reviewed by: des

20 years agoFixed static linkage.
Ruslan Ermilov [Thu, 8 Jan 2004 11:40:19 +0000 (11:40 +0000)]
Fixed static linkage.

Reviewed by: des

20 years agoIf path mtu discovery is enabled set the DF bit in all cases we
Andre Oppermann [Thu, 8 Jan 2004 11:17:11 +0000 (11:17 +0000)]
If path mtu discovery is enabled set the DF bit in all cases we
send packets on a tcp connection.

PR: kern/60889
Tested by: Richard Wendland <richard@wendland.org.uk>
Approved by: re (scottl)

20 years agoDo not set the ip_id to zero when DF is set on packet and
Andre Oppermann [Thu, 8 Jan 2004 11:13:40 +0000 (11:13 +0000)]
Do not set the ip_id to zero when DF is set on packet and
restore the general pre-randomid behaviour.

Setting the ip_id to zero causes several problems with
packet reassembly when a device along the path removes
the DF bit for some reason.

Other BSD and Linux have found and fixed the same issues.

PR: kern/60889
Tested by: Richard Wendland <richard@wendland.org.uk>
Approved by: re (scottl)

20 years agoCorrect the definition of the ndis_miniport_interrupt structure:
Bill Paul [Thu, 8 Jan 2004 10:44:37 +0000 (10:44 +0000)]
Correct the definition of the ndis_miniport_interrupt structure:
the ni_dpccountlock member is an ndis_kspin_lock, not an
ndis_spin_lock (the latter is too big).

Run if_ndis.c:ndis_tick() via taskqueue_schedule(). Also run
ndis_start() via taskqueue in certain circumstances.

Using these tweaks, I can now get the Broadcom BCM5701 NDIS
driver to load and run. Unfortunately, the version I have seems
to suffer from the same bug as the SMC 83820 driver, which is
that it creates a spinlock during its DriverEntry() routine.
I'm still debating the right way to deal with this.

20 years agoUse += instead of = with DPADD / LDADD.
Dag-Erling Smørgrav [Thu, 8 Jan 2004 09:50:56 +0000 (09:50 +0000)]
Use += instead of = with DPADD / LDADD.

20 years agoRegenerate config.h; I don't know why this didn't hit CVS yesterday.
Dag-Erling Smørgrav [Thu, 8 Jan 2004 09:42:35 +0000 (09:42 +0000)]
Regenerate config.h; I don't know why this didn't hit CVS yesterday.

20 years agoRemove obsolete files on the vendor branch.
Dag-Erling Smørgrav [Thu, 8 Jan 2004 09:33:46 +0000 (09:33 +0000)]
Remove obsolete files on the vendor branch.

20 years agoEnable GSSAPI support. [1]
Dag-Erling Smørgrav [Thu, 8 Jan 2004 09:05:24 +0000 (09:05 +0000)]
Enable GSSAPI support. [1]
Also remove some duplicates from ssh's SRCS.

Submitted by: [1] Björn Grönvall <bg@sics.se>

20 years agofixed improper routing-message flag
SUZUKI Shinsuke [Thu, 8 Jan 2004 07:25:04 +0000 (07:25 +0000)]
fixed improper routing-message flag

Obtained from: KAME

20 years agoThe transmit frame status is stored in the last transmit descriptor for the
Don Lewis [Thu, 8 Jan 2004 06:22:15 +0000 (06:22 +0000)]
The transmit frame status is stored in the last transmit descriptor for the
frame, not the first.  It is probably also not safe to free the mbuf chain
as soon as the OWN bit is cleared on the first descriptor since the chip
may not be done copying the frame into the transmit FIFO.  Revert the part of
of busdma conversion (if_dc.c rev 1.115) which changed dc_txeof() to look for
the status in the first descriptor and free the mbuf chain when processing
the first descriptor for the frame, and revert the matching changes elsewhere
in the driver.  This part of the busdma change caused the driver to report
spurious collisions and output errors, even when running in full-duplex mode.
Reverting the mbuf chain handling slightly complicates dc_dma_map_txbuf(),
since it is responsible for setting the OWN bits on the descriptors, but does
not normally have direct access to the mbuf chain.

Tested by:
  Dejan Lesjak <dejan.lesjak at ijs.si>  alpha/<Intel 21143 10/100BaseTX>
  "Xin LI" <delphij at frontfree.net>    i386/<Macronix 98713 10/100BaseTX>
  Wiktor Niesiobedzki <bsd at w.evip.pl> i386/<3Com OfficeConnect 10/100B>

Reviewed by: mux

20 years agoRemove extraneous unlock. This fixes a panic seen when manipulating static
Sam Leffler [Wed, 7 Jan 2004 23:42:21 +0000 (23:42 +0000)]
Remove extraneous unlock.  This fixes a panic seen when manipulating static
entries in the ARP table.

20 years agoCorrect an instance of an erroneous "it's".
Ceri Davies [Wed, 7 Jan 2004 23:31:22 +0000 (23:31 +0000)]
Correct an instance of an erroneous "it's".

PR: docs/59937
Submitted by: Ada Lim <ada@bsd.org>
MFC After: 1 day

20 years agoComsetic tweaks: use PCPU_GET(cpumask) and CPU_ABSENT().
John Baldwin [Wed, 7 Jan 2004 23:00:20 +0000 (23:00 +0000)]
Comsetic tweaks: use PCPU_GET(cpumask) and CPU_ABSENT().

Tested by: Dejan Lesjak <dejan.lesjak@ijs.si>

20 years agoCorrect capitalization.
Greg Lehey [Wed, 7 Jan 2004 23:00:01 +0000 (23:00 +0000)]
Correct capitalization.

Submitted by: ru

20 years agoAdd 'device wlan' to synopsis.
Bill Paul [Wed, 7 Jan 2004 22:17:53 +0000 (22:17 +0000)]
Add 'device wlan' to synopsis.

20 years agoNetgear WG511T card is a CardBus not a PCI card.
Marc Fonvieille [Wed, 7 Jan 2004 20:49:51 +0000 (20:49 +0000)]
Netgear WG511T card is a CardBus not a PCI card.

PR: docs/61039
Submitted by: Michael Lestinsky <michael@lestinsky.de>

20 years agoCorrect and simplify the implementation of RtlEqualUnicodeString().
Bill Paul [Wed, 7 Jan 2004 20:31:51 +0000 (20:31 +0000)]
Correct and simplify the implementation of RtlEqualUnicodeString().

20 years agoAdd a tip on how to print a manual page.
Marc Fonvieille [Wed, 7 Jan 2004 19:49:12 +0000 (19:49 +0000)]
Add a tip on how to print a manual page.

PR: docs/61033
Submitted by: mi@

20 years agoman ftpd says that "by default, anonymous users cannot modify existing files."
Eric Anholt [Wed, 7 Jan 2004 19:28:31 +0000 (19:28 +0000)]
man ftpd says that "by default, anonymous users cannot modify existing files."
However, the code did allow deletion of files.  Make deleting require the -m
flag, too.

PR: bin/60809
Submitted by: Alexander Melkov <melkov@comptek.ru>

20 years agoIt appears drivers may call NdisWriteErrorLogEntry() with locks
Bill Paul [Wed, 7 Jan 2004 19:26:47 +0000 (19:26 +0000)]
It appears drivers may call NdisWriteErrorLogEntry() with locks
held. However, if we need to translate a unicode message table message,
ndis_unicode_to_ascii() might malloc() some memory, which causes
a warning from witness. Avoid this by using some stack space to hold
the translated message. (Also bounds check to make sure we don't
overrun the stack buffer.)

20 years agoWhen draining the tx queue reclaim any node references held in packets.
Sam Leffler [Wed, 7 Jan 2004 19:16:49 +0000 (19:16 +0000)]
When draining the tx queue reclaim any node references held in packets.
This fixes a problem when operating as an AP where clients would get
stuck in the node table because the reference count never went to zero.

20 years agoWhen ath_hal_stoptxdma returns an error dma is still likely stopped
Sam Leffler [Wed, 7 Jan 2004 19:11:11 +0000 (19:11 +0000)]
When ath_hal_stoptxdma returns an error dma is still likely stopped
so don't just stop trying to send a beacon frame or we'll be more likely
to lose sync.  This only seems to happen on some older chips.

20 years agouse ath_reset instead of ath_init when recovering from a watchdog timeout:
Sam Leffler [Wed, 7 Jan 2004 19:07:41 +0000 (19:07 +0000)]
use ath_reset instead of ath_init when recovering from a watchdog timeout:
resetting the hardware is sufficient, no need to reset the 802.11 fsm

20 years agomake hw.ath.debug a tunable
Sam Leffler [Wed, 7 Jan 2004 19:05:35 +0000 (19:05 +0000)]
make hw.ath.debug a tunable

20 years agomake hw.ath.outdoor and hw.ath.countrycode tunables
Sam Leffler [Wed, 7 Jan 2004 19:04:42 +0000 (19:04 +0000)]
make hw.ath.outdoor and hw.ath.countrycode tunables

20 years agosplit debugging messages up into classes;
Sam Leffler [Wed, 7 Jan 2004 18:57:38 +0000 (18:57 +0000)]
split debugging messages up into classes;
ah_debug is now treated as a bit vector

20 years agoLock p->p_textvp before calling vn_fullpath() on it. Note the
Robert Watson [Wed, 7 Jan 2004 17:58:51 +0000 (17:58 +0000)]
Lock p->p_textvp before calling vn_fullpath() on it.  Note the
potential lock order concern due to the vnode lock held
simultaneously by the caller into procfs.

Reported by: kuriyama
Approved by: des