dg [Sun, 24 May 1998 14:59:57 +0000 (14:59 +0000)]
The ipt_ptr field is 1-based (see TCP/IP Illustrated, Vol. 1, pp. 91-95),
so it must be adjusted (minus 1) before using it to do the length check.
I'm not sure who to give the credit to, but the bug was reported by
Jennifer Dawn Myers <jdm@enteract.com>, who also supplied a patch. It
was also fixed in OpenBSD previously by andreas.gunnarsson@emw.ericsson.se,
and of course I did the homework to verify that the fix was correct per
the specification.
PR: 6738
peter [Sun, 24 May 1998 14:41:56 +0000 (14:41 +0000)]
Convert a couple of large allocations to use zones rather than malloc
for better packing. This means that we can choose better values for the
various hash entries without having to try and get it all to fit within
an artificial power of two limit for malloc's sake.
amurai [Sun, 24 May 1998 03:03:10 +0000 (03:03 +0000)]
Primary verison of NetBIOS over TCP/IP. Now you can connect Windows
DOMAIN as DOMAIN user through NAT function. See also RFC1002 for
futher detail of SMB structure.
brian [Sat, 23 May 1998 22:24:50 +0000 (22:24 +0000)]
o Move our prompt descriptor list outside of the bundle.
It's now dealt with by the `server' object. This simplifies
things as we only have one list of prompt descriptors and
the log_ routines check prompt::logactive to determine
whether it should be used for output.
o Include the MP socket UpdateSet() result in bundle::UpdateSet().
o Don't select on the tun device unless we're in NETWORK
phase or AUTO mode.
o Stop the idle timer when we go to DEAD phase. We may
have transferred a link and not had a chance to kill
it.
o Don't fail when trying to unlink our transferred datalink
from our descriptor lists just before the transfer.
o Add our link descriptor to the write set if we got a short
write the last time (physical::out is set).
o Log the connection source address when a connection is closed.
o Remove descriptor::next field. Descriptor lists are not required
any more.
brian [Sat, 23 May 1998 17:05:28 +0000 (17:05 +0000)]
o Make sure we adjust our min seq and process any outstanding queued
incoming fragments when a link goes down.
o Don't use the minimum sequence numbers of links that aren't open.
o Understand sequence number wrapping when determining the minimum
sequence number.
o Add & adjust a few comments.
phk [Sat, 23 May 1998 07:52:17 +0000 (07:52 +0000)]
RADIUS was originally coded to use ports 1645 (radius) and
1646 (radacct), but RFC's 2138 and 2139 define new ports
for RADIUS and RADIUS accounting, namely 1812 and 1813
respectively. FreeBSD 2.2.6 uses the old radacct port, but
the new radius port, which is a bit silly.
PR: 6712
Reviewed by: phk
Submitted by: Nick Hilliard <nick@foobar.org>
wpaul [Fri, 22 May 1998 15:32:22 +0000 (15:32 +0000)]
Remove 2.2.x compatibility code and #ifdefs. Once the shakedown period
in -current is over, I'll put a 2.2.x specific version in the RELENG_2_2
branch. If somebody wants a 2.2 version of this driver now, they can check
out the previous version from CVS or ask me via e-mail.
Gee people, I didn't mean to stir up such a controversy. I just wanted
to make sure I could get this thing to work with both kernel versions
and didn't want to have to maintain two separate copies. All ya hadda
do was ask. :)
des [Thu, 21 May 1998 22:53:24 +0000 (22:53 +0000)]
Correctly identify the precise CPU model within the 686 family: instead
of just printing "Pentium Pro", check the model (cpu_id & 0xf0) and print
the appropriate information.
eivind [Thu, 21 May 1998 19:21:46 +0000 (19:21 +0000)]
Move __FreeBSD_version from src/sys/conf/newvers.sh to
src/sys/sys/param.h, to facilitate access from the kernel. This make
it possible to do outside kernel development and have it actually work
properly.
jkh [Thu, 21 May 1998 16:24:05 +0000 (16:24 +0000)]
Don't use __FreeBSD_version explicitly - none of the other
drivers here do and it also blows up in building GENERIC during
a release build if you try and include <osreldate.h> (which shot
my SNAP dead - argh!). Use __FreeBSD__ instead.
dyson [Thu, 21 May 1998 07:47:58 +0000 (07:47 +0000)]
Make flushing dirty pages work correctly on filesystems that
unexpectedly do not complete writes even with sync I/O requests.
This should help the behavior of mmaped files when using
softupdates (and perhaps in other circumstances also.)
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
wpaul [Wed, 20 May 1998 15:56:11 +0000 (15:56 +0000)]
Change the sanity test here. It's not correct to assume that the record
size we receive here should fit into the receive buffer. Unfortunately,
there's no 100% foolproof way to distinguish a ridiculously large record
size that a client actually meant to send us from a ridiculously large
record size that was sent as a spoof attempt.
The one value that we can positively identify as bogus is zero. A
zero-sized record makes absolutely no sense, and sending an endless
supply of zeroes will cause the server to loop forever trying to
fill its receive buffer.
Note that the changes made to readtcp() make it okay to revert this
sanity test since the deadlock case where a client can keep the server
occupied forever in the readtcp() select() loop can't happen anymore.
This solution is not ideal, but is relatively easy to implement. The
ideal solution would be to re-arrange the way dispatching is handled
so that the select() loop in readtcp() can be eliminated, but this is
difficult to implement. I do plan to implement the complete solution
eventually but in the meantime I don't want to leave the RPC library
totally vulnerable.
peter [Wed, 20 May 1998 09:05:48 +0000 (09:05 +0000)]
Only ignore "owner" permissions selectively rather than always. In some
cases we ignore it (eg: read/write) to maintain chmod-after-open semantics
but in other cases we do care, eg: creating files, access() etc. Never
ignore errors from VOP_ACCESS() on immutable files.
This apparently comes from BSDI (from Keith Bostic) via NetBSD.
jkh [Wed, 20 May 1998 03:05:05 +0000 (03:05 +0000)]
Alpha MAKEDEV as directly imported from NetBSD-current. This will
almost certainly have to change as the FreeBSD/Alpha kernel comes
along, but for the transitionary period this is the most correct.
Obtained from: NetBSD
dufault [Tue, 19 May 1998 21:11:53 +0000 (21:11 +0000)]
1. Add new defs for mins and maxs for the POSIX flavor priorities. They
end up being the same, but it doesn't look like you're comparing
apples and oranges.
2. Use need_resched instead of reset_priority. This isn't right
either, since for example you'll round-robin against equal priority FIFO
processes when lowering the priority of another process,
but this works better and a real fix needs to be in kern_synch and
not out here.
3. This is not a device driver: copyin/copyout the structure.
julian [Tue, 19 May 1998 20:50:41 +0000 (20:50 +0000)]
Change to stop a silly panic. This should be understood better.
Change a buffer swizzle trick to a bcopy. It would be nice if the efficient
trick could be used in the future.
peter [Tue, 19 May 1998 19:40:45 +0000 (19:40 +0000)]
Missing parens caused cpu features not to be printed for cyrix >= M2/MX.
Althought the comments say the datasheet doesn't list the device ID
registers on the M2/MX, they seem to be there and quite alive.
(It's interesting to note that the M2/MX calls itself a 686 class cpu but
is missing a heck of a lot of features, including VME, PGE, PSE, etc)
pb [Tue, 19 May 1998 15:53:50 +0000 (15:53 +0000)]
Move (private) struct ipflow out of ip_var.h, to reduce dependencies
(for ipfw for example) on internal implementation details.
Add $Id$ where missing.
dg [Tue, 19 May 1998 14:04:36 +0000 (14:04 +0000)]
Added fast IP forwarding code by Matt Thomas <matt@3am-software.com> via
NetBSD, ported to FreeBSD by Pierre Beyssac <pb@fasterix.freenix.org> and
minorly tweaked by me.
This is a standard part of FreeBSD, but must be enabled with:
"sysctl -w net.inet.ip.fastforwarding=1" ...and of course forwarding must
also be enabled. This should probably be modified to use the zone
allocator for speed and space efficiency. The current algorithm also
appears to lose if the number of active paths exceeds IPFLOW_MAX (256),
in which case it wastes lots of time trying to figure out which cache
entry to drop.