Commit Graph

23478 Commits

Author SHA1 Message Date
Assar Westerlund ef4cf3e0ea remove pfctlinput 2000-12-19 08:09:36 +00:00
Kirk McKusick 48d617487d Several small but important fixes for snapshots:
1) Be more tolerant of missing snapshot files by only trying to decrement
   their reference count if they are registered as active.

2) Fix for snapshots of filesystems with block sizes larger than 8K
   (from Ollivier Robert <roberto@eurocontrol.fr>).

3) Fix to avoid losing last block in snapshot file when calculating blocks
   that need to be copied (from Don Coleman <coleman@coleman.org>).
2000-12-19 04:41:09 +00:00
Kirk McKusick 6da443cb22 Get rid of spurious check in ffs_truncate for i_size == length
which fails to set the modification time on the file. The same
check a few lines later takes the correct action.

Submitted by:	Ian Dowse <iedowse@maths.tcd.ie>
2000-12-19 04:20:13 +00:00
Assar Westerlund 40dbba5754 translate the flags in recvfrom and recvmsg from linux to bsd ones
Approved by:	marcel
2000-12-19 00:24:25 +00:00
Robert Nordier 1165e4c9a4 Fix column alignment (whitespace-only change). 2000-12-19 00:17:36 +00:00
John Baldwin 48786ef412 Fix another sched_sihand -> sched_swi in a KTR trace message. 2000-12-18 23:59:34 +00:00
John Baldwin 6d0006c203 Convert the sio driver to use a spin mutex instead of a s_lock. This is
going to hurt sio(4) performance for the time being.  As we get closer to
release and have more of the kernel unlocked we can come back to doing
arcane optimizations to workaround the limitations of the sio hardware.
2000-12-18 23:56:16 +00:00
John Baldwin 430e72ee1c Attempt to read and verify the card's status in wi_stop() before sending it
the disable command.  On some systems, writing to the card after it has
been ejected causes the machine to hang.

Reviewed by:	wpaul
2000-12-18 23:49:56 +00:00
Bill Paul 8d79969459 Add power state manipulation to the fxp driver. Some people have
claimed that their Intel NIC is comatose after a warm boot from Windoze.
This is most likely due to the card getting put in the D3 state. This
should bring it back to life.
2000-12-18 22:06:12 +00:00
Bill Paul 14a00c6c68 Use pci_get_powerstate()/pci_set_powerstate() which now exists in the
PCI code. This saves each driver from having to grovel around looking
for the right registers to twiddle.

I should eventually convert the other PCI drivers to do this; for now,
these three are ones which I know need power state handling.
2000-12-18 21:53:05 +00:00
Poul-Henning Kamp d968a3ed90 Remove the "wd" driver. 2000-12-18 20:16:52 +00:00
Poul-Henning Kamp 065b25803d Fix floppy drives on machines with lots of RAM.
The fix works by reverting the ordering of free memory so that the
chances of contig_malloc() succeeding increases.

PR:		23291
Submitted by:	Andrew Atrens <atrens@nortel.ca>
2000-12-18 20:12:13 +00:00
Julian Elischer 589f6ed8ce Divorce the kernel binary ABI version number from the message
format version number. (userland programs should not need to be
recompiled when the netgraph kernel internal ABI is changed.

Also fix modules that don;t handle the fact that a caller may not supply
a return message pointer. (benign at the moment because the calling code
checks, but that will change)
2000-12-18 20:03:32 +00:00
Archie Cobbs cfe844ab1f Use "node->ID" for the node's ID, instead of "(long)node".
Reported by:	julian
2000-12-18 17:18:35 +00:00
Toshihiko ARAI d556784aa3 Linksys Fast Ethernet PCCARD cards supported by the ed driver now
require the addition of flag 0x80000 to their config line in
pccard.conf(5).  This flag is not optional.  These Linksys cards will
not be recognized without it.

Reviewed by:    imp, iwasaki
2000-12-18 15:28:53 +00:00
Julian Elischer 5078fb0b2a Impossible to see typo.. |= instead of != 2000-12-18 13:41:46 +00:00
Assar Westerlund a67036f740 revert addition of strlcpy/strlcat 2000-12-18 13:28:12 +00:00
Jake Burkholder 1156bc4de2 Whitespace. Fix a comment block and an if statement that were wider
than 80 characters.
2000-12-18 07:10:04 +00:00
Brian Feldman 2ab4063613 Unbreak the modules after the last commit (newpcm kobjification). 2000-12-18 06:39:01 +00:00
Jake Burkholder 8b5fb980d1 Add an assertion macro for lockmgr locks, LOCKMGR_ASSERT(lkp, what, p).
The what argument is the hold type that assertion acts on.  LK_SHARED
to assert that the process holds a shared, LK_EXCLUSIVE to assert that
the process holds _either_ a shared lock or an exclusive lock.
2000-12-18 05:50:31 +00:00
Assar Westerlund 41155d57bc add strlcpy and strlcat to kernel 2000-12-18 04:08:58 +00:00
Cameron Grant 0f55ac6c1a kobjify.
this gives us several benefits, including:

* easier extensibility- new optional methods can be added to
  ac97/mixer/channel classes without having to fixup every driver.

* forward compatibility for drivers, provided no new mandatory methods are
  added.
2000-12-18 01:36:41 +00:00
Assar Westerlund ca85ca6099 add a stub for softdep_slowdown so that it's possible to build the
kernel without SOFTUPDATES
2000-12-17 23:59:56 +00:00
Matthew Dillon 6ddaf0f45e Avoid a data-consistency race between write() and mmap()
by ensuring that newly allocated blocks are zerod.  The
race can occur even in the case where the write covers
the entire block.

Reported by: Sven Berkvens <sven@berkvens.net>, Marc Olzheim <zlo@zlo.nu>
2000-12-17 23:57:05 +00:00
John Polstra fba3cfdef2 Fix bug: a read() on a bpf device which was in non-blocking mode
and had no data available returned 0.  Now it returns -1 with errno
set to EWOULDBLOCK (== EAGAIN) as it should.  This fix makes the bpf
device usable in threaded programs.

Reviewed by:	bde
2000-12-17 20:50:22 +00:00
Warner Losh 95b2cbbc17 Call ed_probe_Novel in the AX88190 case as well.
Remove stary blank line.

Submitted by:	Seigo Tanimura <tanimura@r.dl.itc.u-tokyo.ac.jp>
2000-12-17 18:15:15 +00:00
Bill Fumerola 16cd6db04f Use getmicrotime() instead of microtime() when timestamping ICMP packets,
the former is quicker and accurate enough for use here.

Submitted by:	Jason Slagle <raistlin@toledolink.com> (on IRC)
Reviewed by:	phk
2000-12-16 21:39:48 +00:00
Marcel Moolenaar d96cfeae0c Fix a typo that allowed signals caused by traps to be delivered
to the process when said signal is masked.

PR: 23457
Submitted by: Yasuhiko Watanabe <yasu@mrit.mei.co.jp>
2000-12-16 21:03:48 +00:00
Poul-Henning Kamp b11d7a4a2f We currently does not react to ICMP administratively prohibited
messages send by routers when they deny our traffic, this causes
a timeout when trying to connect to TCP ports/services on a remote
host, which is blocked by routers or firewalls.

rfc1122 (Requirements for Internet Hosts) section 3.2.2.1 actually
requi re that we treat such a message for a TCP session, that we
treat it like if we had recieved a RST.

quote begin.

            A Destination Unreachable message that is received MUST be
            reported to the transport layer.  The transport layer SHOULD
            use the information appropriately; for example, see Sections
            4.1.3.3, 4.2.3.9, and 4.2.4 below.  A transport protocol
            that has its own mechanism for notifying the sender that a
            port is unreachable (e.g., TCP, which sends RST segments)
            MUST nevertheless accept an ICMP Port Unreachable for the
            same purpose.

quote end.

I've written a small extension that implement this, it also create
a sysctl "net.inet.tcp.icmp_admin_prohib_like_rst" to control if
this new behaviour is activated.

When it's activated (set to 1) we'll treat a ICMP administratively
prohibited message (icmp type 3 code 9, 10 and 13) for a TCP
sessions, as if we recived a TCP RST, but only if the TCP session
is in SYN_SENT state.

The reason for only reacting when in SYN_SENT state, is that this
will solve the problem, and at the same time minimize the risk of
this being abused.

I suggest that we enable this new behaviour by default, but it
would be a change of current behaviour, so if people prefer to
leave it disabled by default, at least for now, this would be ok
for me, the attached diff actually have the sysctl set to 0 by
default.

PR:		23086
Submitted by:	Jesper Skriver <jesper@skriver.dk>
2000-12-16 19:42:06 +00:00
Poul-Henning Kamp b600010a5b Add a cloning function to vn(4) which triggers on "vn%d.ctl". Give the
.ctl devices their own cdevsw since no I/O can or should be done on them.

Vn(4) is still not entirely DEVFS friendly since it only creates vn%d
nodes.
2000-12-16 16:06:03 +00:00
Yoshihiro Takahashi f3474f630e PC-98 boxes use aic_cbus.c instead of aic_isa.c. 2000-12-16 04:00:40 +00:00
KATO Takenori 1e7e1ff678 Merged from sys/i386/conf/GENERIC revisions 1.292 - 1.294. 2000-12-16 03:31:44 +00:00
Paul Richards d4dc2d4d0f Switch off some debugging code. 2000-12-16 03:29:27 +00:00
KATO Takenori bf0611e746 Merged from sys/i386/i386/machdep.c revision 1.425. 2000-12-16 03:25:08 +00:00
KATO Takenori 00a52ef6ee Merged from files.i386 revision 1.340. 2000-12-16 03:19:05 +00:00
KATO Takenori 7a85504b98 Merged from Makefile.i386 revision 1.215. 2000-12-16 03:17:51 +00:00
KATO Takenori db53335483 Merged from sys/boot/i386/loader/Makefile revision 1.49. 2000-12-16 03:15:48 +00:00
Paul Richards 5d2dea723c Enable building of lnc module. 2000-12-16 01:48:06 +00:00
Paul Richards 96a23f090a Add lnc module. 2000-12-16 01:47:37 +00:00
Paul Richards 3a173aeeb3 Fixup some problems with the merged code of the previous commit. 2000-12-16 01:41:14 +00:00
Paul Richards 232b06012c Newbusify.
Temporarily disable PC98 until I bring it up to date.
2000-12-16 01:33:28 +00:00
Jordan K. Hubbard 6aa623bf53 Back out these two changes inadvertantly made with the last commit. 2000-12-16 00:54:50 +00:00
Bill Paul 163369c243 Apply some contributed patches to reduce number of tx buffer allocation
failures and add some support for WEP on Prism II chip.

Submitted by: YAMAMOTO Shigeru <shigeru@iij.ad.jp>
2000-12-15 23:34:13 +00:00
Matt Jacob 38e147e106 Fix ypo in essage about isabling EISA nterrupt ector
(tip 'o the tired cap to Bernd Walter <ticso@cicely5.cicely.de>)
2000-12-15 23:09:05 +00:00
Jordan K. Hubbard 6c8388dd14 SNAPDATE is an obsolete mechanism which has also been pretty much
of a no-op all along anyway.  There are other ways to set this
for release building, so nuke it.

PR:	22979
2000-12-15 22:26:42 +00:00
Bosko Milekic 09f81a46a5 Change the following:
1.  ICMP ECHO and TSTAMP replies are now rate limited.
  2.  RSTs generated due to packets sent to open and unopen ports
      are now limited by seperate counters.
  3.  Each rate limiting queue now has its own description, as
      follows:

      Limiting icmp unreach response from 439 to 200 packets per second
      Limiting closed port RST response from 283 to 200 packets per second
      Limiting open port RST response from 18724 to 200 packets per second
      Limiting icmp ping response from 211 to 200 packets per second
      Limiting icmp tstamp response from 394 to 200 packets per second

Submitted by: Mike Silbersack <silby@silby.com>
2000-12-15 21:45:49 +00:00
John Baldwin a9b1370731 Delay waking up processes select'ing on the log device directly from
the kernel console.  Instead, change logwakeup() to set a flag in the
softc.  A callout then wakes up every so often and wakes up any processes
selecting on /dev/log (such as syslogd) if the flag is set.  By default
this callout fires 5 times a second, but that can be adjusted by the
sysctl kern.log_wakeups_per_second.

Reviewed by:	phk
2000-12-15 21:23:32 +00:00
Bosko Milekic 38d66a0de3 Make sure to check if MGET(HDR) returned NULL, even when called with M_WAIT.
This fixes the possibility of a NULL pointer dereference in the case where
there are no mbufs or mbuf clusters left.

Approved by: phk
2000-12-15 21:06:55 +00:00
Bill Paul b1df743d8a Whups: only build the if_el module on the x86 platform for now, until
I can confirm it works on the alpha.
2000-12-15 20:14:19 +00:00
Bill Paul 1b49710482 Newbus the if_el (3Com 3c501) driver. Use bus_space_X() functions.
Add detach routine and turn driver into a module so it can be loaded
and unloaded. Also take a stab at implementing multicast packet
reception so that this NIC will work with IPv6. Promiscuous mode
doesn't seem to work, but I'm not sure why. It works well enough that
I can run dhclient on it and put it on the office network though.
Also ripped out spl stuff and replaced it with mutexes.
2000-12-15 20:09:10 +00:00