bmah [Mon, 4 Jun 2001 18:57:54 +0000 (18:57 +0000)]
New release notes: ti(4) and xl(4) VLAN fixes, RFC 1323/1644 workaround
for old terminal services, IP multicast on VLAN devices works, IPv4
fragmentation denial-of-service mitigation, diskcheckd(8).
imp [Mon, 4 Jun 2001 17:14:28 +0000 (17:14 +0000)]
If the chip isn't in power state D0, put it in power state D0. I
elected to do this in the probe rather than the attach so that we don't
disturb things which this might reset. different cards have different
quirks, according to their datasheets.
This should fix the "I booted in windows and rebooted to FreeBSD and
now things don't work" problem.
When looking for an interface appropriate for the (new or changing)
route in ifa_ifwithroute(), as the last resort, look up the route to
the gateway, not destination (to derive the interface from).
deischen [Mon, 4 Jun 2001 12:36:07 +0000 (12:36 +0000)]
Properly initialize a temporary FILE that is allocated off the stack.
The change to reuse _up from FILE (to allow FILE to grow without changing
size) overlooked FILE being allocated off the stack.
dwmalone [Mon, 4 Jun 2001 11:43:29 +0000 (11:43 +0000)]
This patch cleans up the ident stuff in inetd. The code which has
been patched so many times it was a bit of a mess. There are style,
code and man page cleanups. The following are the functional changes:
The RFC only permits the returning of 4 possible error
codes, make sure we only return these (PR 27636).
Use MAXLOGNAME to determine the longest usernames.
Add a -i flag, which returns the uid instead of the username
(this is from a PR 25787, which also contained alot of the
cleanups in this patch).
imp [Mon, 4 Jun 2001 06:49:46 +0000 (06:49 +0000)]
Add new pci attachment for pcic. This supports pci cards as well as
card bus bridges.
We now always use pci interrupts for pci cards. This will allow us to
more easily configure things. You must change your IRQ lines in
/etc/pccard.conf to match what we've probed. I'm not sure the right
way to deal with this right now.
Development of pci pcmcia has been funded by Monzoon Networks AG. I
am grateful for their generosity.
dillon [Mon, 4 Jun 2001 04:04:45 +0000 (04:04 +0000)]
The pipe_write() code was locking the pipe without busying it first in
certain cases, and a close() by another process could potentially rip the
pipe out from under the (blocked) locking operation.
imp [Mon, 4 Jun 2001 03:29:06 +0000 (03:29 +0000)]
Move the pcic interrupt from pcic.c to pcic_isa.c. The ISA handling
for card change interrupts is different than the pci stuff that's
coming soon. Set the management irq in different ways. If
pci_parallel interrutp routing, then use the PCI way of getting
interrupts. Move polling mode into pcic_isa since when we're routing
via pci polling doesn't work because many bridges (systems hang solid).
If we're routing interrupts via pci, they can be shared, so flag them
as such.
Note, this doesn't actually change anything since the pci attachment
isn't quite ready to be committed.
jesper [Sun, 3 Jun 2001 23:33:23 +0000 (23:33 +0000)]
Prevent denial of service using bogus fragmented IPv4 packets.
A attacker sending a lot of bogus fragmented packets to the target
(with different IPv4 identification field - ip_id), may be able
to put the target machine into mbuf starvation state.
By setting a upper limit on the number of reassembly queues we
prevent this situation.
This upper limit is controlled by the new sysctl
net.inet.ip.maxfragpackets which defaults to 200,
as the IPv6 case, this should be sufficient for most
systmes, but you might want to increase it if you have
lots of TCP sessions.
I'm working on making the default value dependent on
nmbclusters.
If you want old behaviour (no upper limit) set this sysctl
to a negative value.
If you don't want to accept any fragments (not recommended)
set the sysctl to 0 (zero).
phk [Sun, 3 Jun 2001 20:02:03 +0000 (20:02 +0000)]
Add diskcheck-daemon.
With a small disk being 20GB these days, chances are pretty good that
an ailing sector will not be read while still being recoverable by
the drive.
Diskcheck daemon will read disks in the background at a low rate and
that way give the diskdrive a chance to detect and correct soft read
errors before they become hard errors.
yar [Sun, 3 Jun 2001 17:31:11 +0000 (17:31 +0000)]
First, wrap the if_up() call into splimp()/splx() because
if_up() must be called at splnet or higher.
Second, set the IFF_RUNNING flag on an interface after its
resources (i.e. tunnel source and destination addresses)
have been set. Note that we don't set IFF_UP because it is
if_up()'s job to do that.
PR: kern/27851
Submitted by: Horacio J. PeÓa <horape@compendium.com.ar>
sobomax [Sun, 3 Jun 2001 12:42:19 +0000 (12:42 +0000)]
- Optimise current cursor position displaying routines, to avoid unnecessary
cursor movements;
- minor cleanups in cursor position displaying routines;
- properly resent "file modified" flag when editing several files.
Remove unused includes, use *min() inline functions rather than a
home-grown macro, rewrite a confusing conditional in snpdevtotty(),
and change ibuf to 512 bytes instead of 1024 bytes in dsnwrite().
When tring to find out if this is a request for a write in
kernel_sysctl and userland_sysctl, check for whether new is NULL, not
whether newlen is 0. This allows one to set a string sysctl to "".
Put the originator's full name in the From and Reply-to fields, and
stick their username (which sendmail will make into an e-mail address)
inside '<>'. Sendmail will still DTRT with this, and it conveniently
puts the submitter's name and e-mail address on one line, just like it
should be after "Submitted by" in a commit message.
jlemon [Sat, 2 Jun 2001 19:51:02 +0000 (19:51 +0000)]
Only touch the PCR register in order to set bits for the fxp driver.
The 3C509-TX card apparently had a slightly different version of the
chip, and has problems when this register is set. The problem does
not appear on the 3C509{BC} cards, but since only the fxp driver needs
specific bits set, conditionalize on that.
tmm [Fri, 1 Jun 2001 22:53:10 +0000 (22:53 +0000)]
Change the way information about swap devices is exported to be more
canonical: define a versioned struct xswdev, and add a sysctl node
handler that allows the user to get this structure for a certain device
index by specifying this index as last element of the MIB.
This new node handler, vm.swap_info, replaces the old vm.nswapdev
and vm.swapdevX.* (where X was the index) sysctls.
imp [Fri, 1 Jun 2001 20:58:32 +0000 (20:58 +0000)]
The orm device. This device gobbles up the Option ROMs in the ISA
memory I/O space. Otherwise, our resource allocation system might
mistakenly assign pccard, plug and play devices or other things
addresses that conflict with ROMs.
I cleaned up his code a little from the submited driver: style(9)
issues, commentary on why something that looks incorrect really is
correct. Also noted that while a checksum field is defined for the
ROMs, enough common hardware neglects it to make it not worthwhile
checking.
Submitted by: Nikolai Saoukh <nms@otdel-1.org>
PR: 22078
gallatin [Fri, 1 Jun 2001 17:39:11 +0000 (17:39 +0000)]
Resurrect platform.pci_intr_map() and essentially undo the effects of
the interface conversion to platform.pci_intr_route(). I've left the
platform.pci_intr_route() function pointer in place, as well as
alpha_pci_route_interrupt(), but no platform currently implements it.
To work around the removal of alpha_platform_assign_pciintr(cfg);
from the pci probe code, I've hooked in calls to platform.pci_intr_map()
in pcib_read_config (similar to the x86 APIC_IO ifdef in pci_cfgregread)
for every chipset that has a platform which needs it.
While here, I've removed the interupt mapping/routing code from the
AS2x00 platform because its not required (it has never been present in
-stable).
Tested on: UP1000, Miata(GL), XP1000, AS2100, AS500
bmah [Fri, 1 Jun 2001 16:29:21 +0000 (16:29 +0000)]
New release notes: lge(4) driver (and update hardware compatability
list from manpage), RANDOM_IP_ID, msdos->msdosfs, chown(8) doesn't
use "." for a delimiter anymore.
brian [Fri, 1 Jun 2001 15:51:10 +0000 (15:51 +0000)]
Support /dev/tun cloning. Ansify if_tun.c while I'm there.
Only tun0 -> tun32767 may now be opened as struct ifnet's if_unit
is a short.
It's now possible to open /dev/tun and get a handle back for an available
tun device (use devname to find out what you got).
The implementation uses rman by popular demand (and against my judgement)
to track opened devices and uses the new dev_depends() to ensure that
all make_dev()d devices go away before the module is unloaded.
iedowse [Fri, 1 Jun 2001 15:20:45 +0000 (15:20 +0000)]
Copy the sockaddr from the netbuf data area, not from the netbuf
data pointer. This bug has been here since the ti-rpc import; it
apparently broke the clnt_control CLGET_SVC_ADDR options.
tmm [Fri, 1 Jun 2001 13:29:19 +0000 (13:29 +0000)]
Replace a use of the hw.nintr sysctl as it has just gone away, cast
size_t variables when passing them to a printf-like function, and some
minor cleanups.
tmm [Fri, 1 Jun 2001 13:23:28 +0000 (13:23 +0000)]
Clean up the code exporting interrupt statistics via sysctl a bit:
- move the sysctl code to kern_intr.c
- do not use INTRCNT_COUNT, but rather eintrcnt - intrcnt to determine
the length of the intrcnt array
- move the declarations of intrnames, eintrnames, intrcnt and eintrcnt
from machine-dependent include files to sys/interrupt.h
- remove the hw.nintr sysctl, it is not needed.
- fix various style bugs
Requested by: bde
Reviewed by: bde (some time ago)
kris [Fri, 1 Jun 2001 10:02:28 +0000 (10:02 +0000)]
Add ``options RANDOM_IP_ID'' which randomizes the ID field of IP packets.
This closes a minor information leak which allows a remote observer to
determine the rate at which the machine is generating packets, since the
default behaviour is to increment a counter for each packet sent.
obrien [Fri, 1 Jun 2001 09:56:15 +0000 (09:56 +0000)]
Both X11 (3.x and 4.x) currently lack a libdata/ subdirectory,
(which is present both in /usr and /usr/local) which is causing a few
ports to erroneously report mtree failures on bento.