Commit Graph

19203 Commits

Author SHA1 Message Date
Yoshinobu Inoue f7d7fca7fd Prototype fix for IPsec authentication related functions
Some of IPsec authentication related functions should have
  'const' for its 2nd argument, but not now.
  But if someone try to use them, and passed const data for
  those functions, then much bogus compile warnings will be
  generated.
  So those funcs prototype should be modified.

Requested by: archie
Approved by: jkh
2000-02-10 19:35:53 +00:00
Yoshinobu Inoue 1aa540eb03 Forbid include of soem inet6 header files from wrong place
KAME put INET6 related stuff into sys/netinet6 dir, but IPv6
  standard API(RFC2553) require following files to be under sys/netinet.
    netinet/ip6.h
    netinet/icmp6.h
  Now those header files just include each following files.
    netinet6/ip6.h
    netinet6/icmp6.h

  Also KAME has netinet6/in6.h for easy INET6 common defs
  sharing between different BSDs, but RFC2553 requires only
  netinet/in.h should be included from userland.
  So netinet/in.h also includes netinet6/in6.h inside.

  To keep apps portability, apps should not directly include
  above files from netinet6 dir.
  Ideally, all contents of,
    netinet6/ip6.h
    netinet6/icmp6.h
    netinet6/in6.h
  should be moved into
    netinet/ip6.h
    netinet/icmp6.h
    netinet/in.h
  but to avoid big changes in this stage, add some hack, that
    -Put some special macro define into those files under neitnet
    -Let files under netinet6 cause error if it is included
     from some apps, and, if the specifal macro define is not
     defined.
     (which should have been defined if files under netinet is
     included)
    -And let them print an error message which tells the
     correct name of the include file to be included.

  Also fix apps which includes invalid header files.

Approved by: jkh

Obtained from: KAME project
2000-02-10 19:33:58 +00:00
Robert Watson 5bdee2c5d5 Fix sysctl namespace for jail: move the kern.jailcansethostname to
kern.prison.set_hostname_allowed, off of the kern.prison node.  Future
jail twiddles should be placed in this namespace.
2000-02-10 18:51:58 +00:00
Nick Hibma 8f9683e20c Correctly handle the conversion from virtual to physical addresses. The
problem was basically (for offset > 4096):

	vtophys(addr) + offset != vtophys(addr + offset)

Also, use TD's with a maximum size of 4k instead of 8kb for OHCI
controllers.

This problem occurs in drivers that use large transfer sizes:
umass, host2host and ethernet with jumbo frames.
2000-02-10 18:50:19 +00:00
Luigi Rizzo 9fcc079584 Move definition of fw_enable from ip_fw.c to ip_input.c
so we can compile kernels without IPFIREWALL .

Reported-by: Robert Watson
Approved-by: jordan
2000-02-10 17:56:01 +00:00
Luigi Rizzo 6355710df8 Whoops... forgot braces in a conditional
Revealed-by: diff with -STABLE version (the advantage of having
    multiple lines of development...)
Approved-by: jordan
2000-02-10 16:50:53 +00:00
Luigi Rizzo 6bc748b057 Support the net.inet.ip.fw.enable variable, part of
the recent ipfw modifications.

Approved-by: jordan
2000-02-10 14:19:53 +00:00
Luigi Rizzo 03c612662b Support for stateful (dynamic) ipfw rules. They are very
similar to ipfilter's keep-state.

Look at the updated ipfw(8) manpage for details.

Approved-by: jordan
2000-02-10 14:17:40 +00:00
Robert Watson 6c144e7521 Introduce a new sysctl, kern.jailcansethostname, which determines whether
or not a process in a jail, with privilege, may set the jail's hostname.
Defaults to 1, which permits this.  May be set to 0 by a process with
appropriate privilege outside of jail.  Preventing hostname renaming
from within a jail is currently required to make jails manageable, as they
a currently identifiable only by hostname using /proc, which may be
modified without this sysctl being set to 0.  This will be documented
in upcoming man commits.

Authorized by:	jkh, the ever-patient
2000-02-10 05:32:03 +00:00
Bill Fumerola ce0c0d9da9 kbdcontrol isn't in everyones path(read: non-root people), so specify
an absolute path for us mere mortals.

Approved by:	jkh
2000-02-10 01:42:04 +00:00
Bill Paul 74ea2d6f60 Update the Tigon driver to use the 12.3.18 firmware release from Alteon.
(No changes to the driver code itself.)

Approved by: jkh
2000-02-10 00:37:48 +00:00
Justin T. Gibbs 85ac786b13 Kill the "unpause_always" argument to unpause_sequencer(). The reasons
for optimizing the unpause operation no-longer exist, and this is much
safer.

When restarting the sequencer, reconstitute the free SCB list on the card.
This deals with a single instruction gap between marking the SCB as free
and actually getting it onto the free list.

Reduce the number of transfer negotiations that occur.  In the past, we
renegotiated after every reported check condition status.  This ensures
that we catch devices that have unexpectidly reset.  In this situation,
the target will always report the check condition before performing a
data-phase.  The new behavior is to renegotiate for any check-condition where
the residual matches the orginal data-length of the command (including
0 length transffers).  This avoids renegotiations during things like
variable tape block reads, where the check condition is reported only
to indicate the residual of the read.

Revamp the parity error detection logic.  We now properly report and
handle injected parity errors in all phases.  The old code used to hang
on message-in parity errors.

Correct the reporting of selection timeout errors to the XPT.  When
a selection timeout occurs, only the currently selecting command
is flagged with SELTO status instead of aborting all currently active
commands to that target.

Fix flipped arguments in ahc_match_scb and in some of the callers of this
routine.  I wish that gcc allowed you to request warnings for enums passed
as ints.

Make ahc_find_msg generically handle all message types.

Work around the target mode data-in wideodd bug in all non-U2 chips.
We can now do sync-wide target mode transfers in target mode across the
hole product line.

Use lastphase exclusively for handling timeouts.  The current phase
doesn't take the bus free state into account.

Fix a bug in the timeout handler that could cause corruption of the
disconnected list.

When sending an embedded cdb to a target, ensure that we start on a
quad word boundary in the data-fifo.  It seems that unaligned stores
do not work correctly.
2000-02-09 21:25:00 +00:00
Justin T. Gibbs 1907f932b8 Fix parity error detection logic for aic7880 and aic7895 chips during
the probe of external SRAM.

Approved by: jkh@FreeBSD.org
2000-02-09 21:00:22 +00:00
Guido van Rooij 6cd756a2b5 Bring over ipfilter v3_3_8 kernel sources, including merging the
local modifications.
Also fix initializing fr_running in KLD case.
Rename ipl_inited to fr_runninhg in mlfk_ipl

Approved by: jkh
2000-02-09 20:56:36 +00:00
Andrew Gallatin da4009202a Allow allows peer pci buses which are directly connected to the RCC host pci
chipset to be probed & attached on newer Dell PowerEdge servers, such as
the 2400 and 4400.

Reviewed by: 	dfr, msmith, jlemon
Tested by:	hnokubi@yyy.or.jp (in a previous incantation)
Approved by:	jkh
2000-02-09 20:05:30 +00:00
Ruslan Ermilov a6120246a2 Support the new ata(4) syntax, while providing backward compatibility for wd(4).
Reviewed by:	jkh, msmith, sos
Approved by:	jkh
2000-02-09 19:23:46 +00:00
Matthew N. Dodd d00d79c12c Remove the old copy of this file. It is now active in its new location.
Implicit Approval by:	 jkh
2000-02-09 04:18:41 +00:00
Matthew N. Dodd 978d4f5bc8 Complete the repo-copy of ida_pci.c to sys/dev/ida/
Implicit Approval by:	 jkh
2000-02-09 04:17:10 +00:00
Robert Watson 35a0a88fda Correct an oversight in jail() that allowed processes in jail to access
ptys in ways that might be unethical, especially towards processes not in
jail, or in other jails.

Submitted by:	phk
Reviewed by:	rwatson
Approved by:	jkh
2000-02-09 03:32:11 +00:00
Yoshinobu Inoue a683a7dd4f Avoid kernel panic when tcp rfc1323 and rfc1644 options are enabled
at the same time.

   When rfc1323 and rfc1644 option are enabled by sysctl,
   and tcp over IPv6 is tried, kernel panic happens by the
   following check in tcp_output(), because now hdrlen is bigger
   in such case than before.

/*#ifdef DIAGNOSTIC*/
        if (max_linkhdr + hdrlen > MHLEN)
                panic("tcphdr too big");
/*#endif*/

   So change the above check to compare with MCLBYTES in #ifdef INET6 case.
   Also, allocate a mbuf cluster for the header mbuf, in that case.

Bug reported at KAME environment.
Approved by: jkh

Reviewed by: sumikawa
Obtained from: KAME project
2000-02-09 00:34:40 +00:00
Nicolas Souchu 249a96889e Fix system hang when printer locks on missing paper
(also called the "printer fiasco")

Approved by: jkh
2000-02-08 21:46:27 +00:00
Poul-Henning Kamp 9b6d9dba20 Also allow non-rot processes to setproctitle()
Submitted by:	Paul Saab <paul@mu.org>
Approved by:	jkh
2000-02-08 19:54:15 +00:00
Søren Schmidt 1af69d6936 Probe cosmetics. 2000-02-08 18:38:39 +00:00
Søren Schmidt cc8baa1136 The bde script has a bug, I used a patch from it verbatim, bad idea....
Fixed...
2000-02-08 16:39:11 +00:00
Luigi Rizzo 25a3a898ca Update bridging code to the one already in -stable (this was
forgotten some time ago...).

Approved-by: jordan
2000-02-08 14:53:55 +00:00
Søren Schmidt e8359a57de Do refcounting of open devices (more) correctly.
count_dev funtion by phk.
2000-02-07 23:05:40 +00:00
Søren Schmidt a9ec39136b Dont panic if no sub-driver is found. 2000-02-07 22:57:11 +00:00
Søren Schmidt 77145a3388 Unbreak addump, now dumping works again. 2000-02-07 22:56:32 +00:00
Nick Hibma 4f2e8d6383 Add PCI Id's for i810 chipsets.
PR:		16517
Submitted by:	SAKIYAMA Nobuo <sakichan@lares.dti.ne.jp>
Approved by:	jhk
2000-02-07 12:50:33 +00:00
Matthew N. Dodd 5326b23cd6 m_pullup() frees the supplied mbuf on failure; we don't need to try
and do this ourselves.

Approved by:	jkh
Noticed by:	Mike Spengler <mks@networkcs.com>
2000-02-07 06:18:38 +00:00
Yoshinobu Inoue 648c4d3822 IPv6 prefix assignment bug fixes.
(1)When all related IPv6 addresses are removed,
       then remove the associated IPv6 prefix.
    (2)When multiple IPv6 link local addrs exist for a same
       interface , then let its IPv6 prefix have multiple
       interface id, and create multiple IPv6 global addrs with same
       interface id.
    (3)When a new IPv6 link local addr is assigned for an
       interface, then let its IPv6 prefix also have the
       interface id of the new IPv6 link local addr, and
       create new IPv6 global addrs with same interface id.

Approved by: jkh
2000-02-07 01:45:30 +00:00
Yoshinobu Inoue 836b116ab0 Permit site local addr in IPv6 source address selection rule.
KAME source addr selection rule had a problem to treat IPv6 site
  local addr.
  The rule is completely rewritten recently and the above problem
  is also fixed, but rewriting same code part in freebsd4.0 is too
  dangerous in this stage, so just add workaround to avoid
  the problem. Just add code for IPv6 site local addresses into IPv6
  source addr selection algorythm part.
2000-02-07 01:32:41 +00:00
Nick Hibma 3a119ee1e2 Don't use tsleep when cold booting. It is called before bus->use_polling
is initialised by usb_init.

This might solve problems with some controllers not being initiliased
properly, because a delay was effectively a tsleep that returned
immediately.

Approved by:	jhk
2000-02-06 14:59:00 +00:00
Nick Hibma 16422b76f1 Correctly handle suspend and resume in APM.
Up to now, errors from DEVICE_SUSPEND(root_bus) were ignored. The fix for
this problem (the introduction of defaults for device methods) has been
committed months ago by Doug Rabson.

Second, the suspended devices were not always properly resumed on error.

Third, swapped the order for calling restore hooks and restore methods, to
be in line with the cases above.

Reviewed by:	Doug Rabson
Approved by:	jhk
2000-02-06 14:57:05 +00:00
Nick Hibma ef4da90333 Disable the generation of SMIs (System Management Interrupts). Always set
the PIRQD bit.

This fixes the problem of uhub0 hanging forever during boot when USB
keyboard support is switched on in the BIOS on motherboards with Intel
chipsets (UHCI).

Approved by:	The Sheep
2000-02-06 14:52:27 +00:00
KATO Takenori 080be1dd6a Synced with sys/boot/i386/loader/Makefile rev 1.41. 2000-02-05 02:21:31 +00:00
KATO Takenori 48ca6b1019 Synced with sys/i386/conf/GENERIC revision 1.241.
Approved by:	jkh
2000-02-05 00:43:04 +00:00
Luigi Rizzo 2dea85d508 Add a NOFORTH variable so we can build a smaller loader without
Forth support, for use with PicoBSD

Approved-By: jordan
2000-02-04 20:57:09 +00:00
Luigi Rizzo 9fbf0caaac Fix a (mostly harmless) scheduling-in-the-past problem with
dummynet (already fixed in -stable, was waiting for Jordan's
approval due to the code freeze).

Reported-By: Mike Tancsa
Approved-By: Jordan
2000-02-04 16:45:33 +00:00
Justin T. Gibbs 4bb38e7b78 Fix indentation.
Overlooked by:	n_himba@FreeBSD.org but not bde@FreeBSD.org
2000-02-04 14:25:24 +00:00
Nick Hibma 3cbd7cadf5 Unbreak LINT (missing curly brace).
Broken by:	gibbs
2000-02-04 14:14:51 +00:00
Søren Schmidt 96ebd6d1fc fix support for shared IRQ's.
fix support for multiple HPT & Promise controllers.

support mixed 33/66 devices on the Promise 66 controllers.

fix the refcount stuff in the atapi drivers.

misc cleanups.
2000-02-04 10:20:22 +00:00
Nick Hibma b70b9ce019 Commit missing bits, forgotten when committing support for suspend/resume
for USB.

Call uhci_power when suspending and resuming.

Approved by: The One.
2000-02-04 10:18:37 +00:00
Jordan K. Hubbard 4a04162824 Clean up POSIX options, syncronize generics. 2000-02-04 07:02:53 +00:00
Matt Jacob 0f819b8832 Add a quirk type (and one for ARCHIVE Python's) that disables the
dummy read at sa_mount that attempts to latch up density. This breaks
on at least one drive and sends it into the weeds.

Approved:	jkh
2000-02-03 18:29:25 +00:00
Justin T. Gibbs 31fef9fb1a Update copyright license terms to match the reset of the aic7xxx dirver. 2000-02-03 16:54:11 +00:00
Justin T. Gibbs b27f40c064 Add support for the AdvanSys ASC38C0800 Ultra2 chipset. Preliminary
support is also included for the ASC38C1600 Ultra160 chipset, but
as firmware is not yet available for this chip, it is disabled.

Approved by: jkh@FreeBSD.org
2000-02-03 16:34:57 +00:00
KATO Takenori 3c21e97804 Synced with sys/i386/conf/GENERIC rev 1.240.
Approved by:	jkh
2000-02-03 10:46:28 +00:00
Matthew N. Dodd 4af90a4da4 Make sure that the entire header is in the first mbuf before we
attempt to copy the ethernet header forward and otherwise encapsulate
a packet for output.

This fixes the panic when using VLAN devices on hardware that doesn't
do 802.1Q tagging onboard.  (That is to say, all drivers except the Tigon.)

My tests consisted of telnet, ttcp, and a pingflood of packets
between 1 and 1600 (plus headers) bytes.

MFC to follow in 1 week.

Approved by:	jkh
2000-02-03 07:44:39 +00:00
Archie Cobbs b12cbc348c The flags PKT_ALIAS_PUNCH_FW and PKT_ALIAS_PROXY_ONLY were both
being defined as 0x40.  Change the former to be 0x100.

Submitted by:	Erik Salander <erik@whistle.com>
Approved by:	jkh
2000-02-02 23:49:32 +00:00