]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
18 years agoThis commit was generated by cvs2svn to compensate for changes in r149511,
wollman [Fri, 26 Aug 2005 18:39:31 +0000 (18:39 +0000)]
This commit was generated by cvs2svn to compensate for changes in r149511,
which included commits to RCS files with non-trunk default branches.

18 years agoVendor update of timezone database.
wollman [Fri, 26 Aug 2005 18:39:31 +0000 (18:39 +0000)]
Vendor update of timezone database.

Changes to historical dates in: Azerbaijan, B.I.O.T., China, Denmark,
Libya, and Poland.

Changes to current dates in: East Timor, Haiti, Israel, Kazakhstan,
Nicaragua, Paraguay, Samoa, Tunisia, Uruguay

Changes to future dates in: Australia, Iran, United States

Obtained from: ftp://elsie.nci.nih.gov/pub/tzdata2005l.tar.gz

18 years agoClarify the description of the bus_dmasync_op_t operation flags. This has
scottl [Fri, 26 Aug 2005 18:19:01 +0000 (18:19 +0000)]
Clarify the description of the bus_dmasync_op_t operation flags.  This has
been misleading and even wrong since the import of the page.

18 years agoPretty print multipath routes.
andre [Fri, 26 Aug 2005 18:08:24 +0000 (18:08 +0000)]
Pretty print multipath routes.

Before (backslash in c syntax meaning):
 6  p16-2-0-0.r21.sttlwa01.us.bb.verio.net (129.250.2.180)  71.027 ms \
p16-1-1-3.r20.sttlwa01.us.bb.verio.net (129.250.2.6)  66.730 ms  66.535 ms
 7  xe-0-2-0.r20.sttlwa01.us.bb.verio.net (129.250.4.16)  71.092 ms \
xe-3-1.r00.sttlwa01.us.bb.verio.net (129.250.2.205)  66.598 ms \
xe-0-2-0.r20.sttlwa01.us.bb.verio.net (129.250.4.16)  71.024 ms

After:
 6  p16-2-0-0.r21.sttlwa01.us.bb.verio.net (129.250.2.180)  71.027 ms
    p16-1-1-3.r20.sttlwa01.us.bb.verio.net (129.250.2.6)  66.730 ms  66.535 ms
 7  xe-0-2-0.r20.sttlwa01.us.bb.verio.net (129.250.4.16)  71.092 ms
    xe-3-1.r00.sttlwa01.us.bb.verio.net (129.250.2.205)  66.598 ms
    xe-0-2-0.r20.sttlwa01.us.bb.verio.net (129.250.4.16)  71.024 ms

Submitted by: Richard A Steenbergen <ras at e-gerbil.net>
MFC after: 3 days

18 years agoAdd newline to debuging printf.
glebius [Fri, 26 Aug 2005 15:27:18 +0000 (15:27 +0000)]
Add newline to debuging printf.

PR: kern/85271
Submitted by: Simon Morgan

18 years ago Cleanup the reader/writer policy in netgraph(4). Assign
glebius [Fri, 26 Aug 2005 15:14:33 +0000 (15:14 +0000)]
  Cleanup the reader/writer policy in netgraph(4). Assign
either reader or writer flag on item in the function, that
allocates the item. Do not modify these flags when item is
applied or queued.
  The only exceptions are node and hook overrides - they can
change item flags to writer.

18 years agoShuffle around the order in which the components are compiled.
le [Fri, 26 Aug 2005 14:40:32 +0000 (14:40 +0000)]
Shuffle around the order in which the components are compiled.

This way, the VINUMDRIVE class is loaded before the VINUM class,
but since geom does the tasting for newly arrived classes
last-in-first-out, the VINUM class tastes first.

This removes the need to call gv_parse_config() in the drive
taste path.

18 years ago- Use m_defrag() instead of homerolling our own variant
jhb [Fri, 26 Aug 2005 14:27:38 +0000 (14:27 +0000)]
- Use m_defrag() instead of homerolling our own variant
  tulip_mbuf_compress().  If we fail to allocate a new mbuf to copy the
  data into, put the mbuf back in the driver's send queue so that we can
  retry it later rather than throwing the packet away.
- Use m_devget() instead of doing it inline ourselves in the
  TULIP_COPY_RXDATA case.  If we fail to allocate an mbuf to copy the data
  into, don't forget about the original mbuf cluster.  The old code would
  lose the pointer and leak the cluster in that case.  Now it doesn't lose
  it but always sticks the original rx buffer back into the receive ring
  after trying to copy the data out and send it up the stack.  Also, if we
  fail to allocate a new mbuf to copy the data into, log an input error.
  Also, don't combine the priming case with the received-a-packet case to
  make the code flow a bit clearer and easier to follow.

18 years agoRemove the el(4) driver for 3Com 3c501 ISA NICs from HEAD as threatened
jhb [Fri, 26 Aug 2005 13:42:04 +0000 (13:42 +0000)]
Remove the el(4) driver for 3Com 3c501 ISA NICs from HEAD as threatened
earlier as no one has stepped up to test recent changes to the driver.
Oddly, the module was actually turned on on ia64 though I'm fairly certain
that no ia64 machine has ever had or will ever have an ISA slot.

Axe borrowed from: phk

18 years agoVerify offset before reading.
pjd [Fri, 26 Aug 2005 12:50:08 +0000 (12:50 +0000)]
Verify offset before reading.

MFC after: 2 days

18 years agoOops, I forget to add item in files .
takawata [Fri, 26 Aug 2005 12:48:34 +0000 (12:48 +0000)]
Oops, I forget to add item in files .

Pointed out by: pjd

18 years agoUpdate Document.
takawata [Fri, 26 Aug 2005 11:39:38 +0000 (11:39 +0000)]
Update Document.

18 years agoAdd NTFS labeling function.
takawata [Fri, 26 Aug 2005 11:35:10 +0000 (11:35 +0000)]
Add NTFS labeling function.

Reviewed by:pjd

18 years agoTwo minor optimizations of fdalloc():
des [Fri, 26 Aug 2005 11:16:39 +0000 (11:16 +0000)]
Two minor optimizations of fdalloc():

 - if minfd < fd_freefile (as is most often the case, since minfd is
   usually 0), set it to fd_freefile.

 - remove a call to fd_first_free() which duplicates work already done
   by fdused().

This change results in a small but measurable speedup for processes
with large numbers (several thousands) of open files.

PR: kern/85176
Submitted by: Divacky Roman <xdivac02@stud.fit.vutbr.cz>
MFC after: 3 weeks

18 years agoFix a one byte off error which causes "less" to crash if you view a
tjr [Fri, 26 Aug 2005 10:05:59 +0000 (10:05 +0000)]
Fix a one byte off error which causes "less" to crash if you view a
large file, jump to the end, scroll backwards with "b" and try to search
backwards afterwards.

Submitted by: Matthias Scheler

18 years agoUnbreak tail -f on non-local filesystems.
ps [Fri, 26 Aug 2005 08:15:57 +0000 (08:15 +0000)]
Unbreak tail -f on non-local filesystems.

18 years agoRemedy the following three problems:
alc [Fri, 26 Aug 2005 05:18:46 +0000 (05:18 +0000)]
Remedy the following three problems:

1. The amd64 pmap, unlike the i386 pmap, maintains a reference count
   for each page directory (PD) page.  However, in the transformation
   of the i386 pmap into the amd64 pmap, operations, such as
   pmap_copy() and pmap_object_init_pt(), that create 2MB "superpage"
   mappings by setting the PG_PS bit in a PD entry were not modified
   to adjust the underlying PD page's reference count.  Consequently,
   superpage mappings could disappear prematurely.

2. pmap_object_init_pt() could crash or corrupt memory if either the
   virtual address range being mapped crosses a 1GB boundary in the
   virtual address space or nothing is mapped in the 1GB area.

3. When pmap_allocpte() destroys a 2MB "superpage" mapping it does not
   reduce the pmap's resident count accordingly.  It should.  (This
   bug is inherited from i386.)

Discussed with: peter
Reviewed by:    tegge

18 years agoSupport ifconfig_<ifn> variables containing quoted variables with spaces
brooks [Fri, 26 Aug 2005 04:06:17 +0000 (04:06 +0000)]
Support ifconfig_<ifn> variables containing quoted variables with spaces
in them by wrapping the ifconfig command with eval "...".

For example, this allows:

ifconfig_iwi0="DHCP ssid 'foo bar baz'"

18 years agoUnbreak compiles with ACPI_DEBUG.
kan [Fri, 26 Aug 2005 02:21:02 +0000 (02:21 +0000)]
Unbreak compiles with ACPI_DEBUG.

18 years agoIn read_string(), when the last character was a backslash, unincrement
brooks [Fri, 26 Aug 2005 01:25:59 +0000 (01:25 +0000)]
In read_string(), when the last character was a backslash, unincrement
the output index instead of keeping what ever trash was in the buffer.

Reported by: iedowse

18 years agoUse a more robust, grep-free command to get the interface of the current
brooks [Fri, 26 Aug 2005 01:07:51 +0000 (01:07 +0000)]
Use a more robust, grep-free command to get the interface of the current
default route.

Submitted by: Rostislav Krasny <rosti dot bsd at gmail dot com>

18 years agoDon't and/remove a route to our assigned IP through 127.0.0.1. It
brooks [Fri, 26 Aug 2005 01:02:38 +0000 (01:02 +0000)]
Don't and/remove a route to our assigned IP through 127.0.0.1.  It
serves no apparent purpose (we commented this out ages ago in the ISC
scripts) and cases problems with some ADSL setups.

Reported by: Rostislav Krasny <rosti dot bsd at gmail dot com>

18 years agoFor FreeBSD 4 binaries, when trying to read from a device that does
ps [Fri, 26 Aug 2005 01:00:19 +0000 (01:00 +0000)]
For FreeBSD 4 binaries, when trying to read from a device that does
not exsist, do not have ioctl return an error, but instead set -1
in the data returned to the user.  This allows the HP bios flash
utilities to work without requiring changes to their code.

Reviewed by: jhb

18 years agoClarify the confusion over Farallon cards taht differ only by arrow color
imp [Thu, 25 Aug 2005 23:11:10 +0000 (23:11 +0000)]
Clarify the confusion over Farallon cards taht differ only by arrow color

18 years ago- Remove non-bus-dma code.
jhb [Thu, 25 Aug 2005 21:06:56 +0000 (21:06 +0000)]
- Remove non-bus-dma code.
- Remove form feed characters.
- Fixup style of function declarations.
- Assume that an mbuf cluster is big enough to hold an ethernet frame.
  (This should really be using m_defrag(), but this diff is just simple
  changes for now.)

18 years agoNMI handler should not enable interrupts.
ups [Thu, 25 Aug 2005 20:33:43 +0000 (20:33 +0000)]
NMI handler should not enable interrupts.

Tested by: kris@
MFC after: 3 weeks

18 years agoAdd regression tests for '-L' option.
pjd [Thu, 25 Aug 2005 20:13:58 +0000 (20:13 +0000)]
Add regression tests for '-L' option.

18 years agoMajor rototill of this driver to add FreeBSD bus-dma support:
jhb [Thu, 25 Aug 2005 20:12:43 +0000 (20:12 +0000)]
Major rototill of this driver to add FreeBSD bus-dma support:
- Allocate arrays of metadata for the descriptors in the rx and tx rings
  and change the ring pointers to walk the metadata array rather than the
  actual descriptor rings.  Each metadata object contains a pointer to its
  descriptor, a pointer to any associated mbuf, and a pointer to the
  associated bus_dmamap_t in the bus_dma case.  The mbuf pointers replace
  the tulip_txq and tulip_rxq local ifqueue's in the softc.
- Add lots of KTR trace entries using a local KTR_TULIP level which
  defaults to 0, but can be changed to KTR_DEV at the top of the file
  when debugging.
- Rename tulip_init(), tulip_start(), tulip_ifinit(), and tulip_ifstart()
  to tulip_init_locked(), tulip_start_locked(), tulip_init(), and
  tulip_start(), respectively, to match the convention in other drivers.
- Add a TULIP_SP_MAC() macro to encode two bytes of the MAC address into
  the setup buffer and use that in place of lots of BYTE_ORDER #ifdef's.
  Also, remove an incorrect XXX comment I added earlier, the driver was
  correct (at least it does the same thing dc(4) does).  TULIP_SP_MAC
  was shamelessly copied from DC_SP_MAC() in dc(4).
- Remove the #ifdef'd NetBSD bus-dma code and replace it with FreeBSD
  bus-dma code that not only compiles but even works at runtime.
- Use callout_init_mtx() instead of just callout_init().
- Correct the various wrapper macros for bus_dmamap_sync() for the rx
  and tx buffers to only ask for the sync ops that they actually need.
- Tidy the #ifdef TULIP_COPY_RXDATA code by expanding an #ifdef a bit
  so it becomes easier to read at the expense of a couple of duplicated
  lines of code.  Also, use m_getcl() to get an mbuf cluster rather than
  MGETHDR() followed by MCLGET().
- Maintain the ring free (ri_free) count for the rx ring metadata since
  we no longer have tulip_rxq.ifq_len around to indicate how many mbuf's
  are currently in the rx ring.
- Add code to teardown bus_dma resources when attach fails and generally
  fixup attach to do a better job of cleaning up when it fails.  This
  gets us a good bit closer to possibly having a detach method someday
  and making this driver an unloadable module.
- Add some functions that can be called from ddb to dump the state of
  a descriptor ring and to dump the state of an individual descriptor.
- Various comment grammer and spelling fixes.

I have bus-dma turned on by default, but I've left the non-bus-dma code
around so that it can be turned off to aid in debugging should any problems
turn up later on.  I'll be removing the non-bus-dma code in a subsequent
commit.

18 years ago'-F' option behaviour was reverted, so revert previous commit.
pjd [Thu, 25 Aug 2005 20:11:39 +0000 (20:11 +0000)]
'-F' option behaviour was reverted, so revert previous commit.

18 years agoRevert previous behaviour of '-F' option and add '-L' option, which will
pjd [Thu, 25 Aug 2005 20:10:47 +0000 (20:10 +0000)]
Revert previous behaviour of '-F' option and add '-L' option, which will
tell pkill(1)/pgrep(1) to try to flock(2) pidfile before reading PID from
there.

Discussed with: jhb, gad

18 years agoBump __FreeBSD_version for memmem(3).
andre [Thu, 25 Aug 2005 19:49:53 +0000 (19:49 +0000)]
Bump __FreeBSD_version for memmem(3).

18 years agoAppropriate namespace protection for memmem(3).
andre [Thu, 25 Aug 2005 19:46:38 +0000 (19:46 +0000)]
Appropriate namespace protection for memmem(3).

Submitted by: wollman
MFC after: 3 days

18 years agoAdd the function memmem(3) as found in glibc and others.
andre [Thu, 25 Aug 2005 18:26:58 +0000 (18:26 +0000)]
Add the function memmem(3) as found in glibc and others.
It is the binary equivalent to strstr(3).

 void *memmem(const void *big, size_t big_len,
const void *little, size_t little_len);

Submitted by: Pascal Gloor <pascal.gloor at spale.com>
MFC after: 3 days

18 years agoAdd myself as a maintainer of Bluetooth code
emax [Thu, 25 Aug 2005 17:14:39 +0000 (17:14 +0000)]
Add myself as a maintainer of Bluetooth code

18 years agoFix a bug introduced in revision 1.9 which causes chkgrp to coredump on
cperciva [Thu, 25 Aug 2005 17:01:06 +0000 (17:01 +0000)]
Fix a bug introduced in revision 1.9 which causes chkgrp to coredump on
certain corrupt files.

Submitted by: liamfoy@dragonflybsd.org
Reported by: Nikolay Kalev, via freebsd-current
MFC after: 3 days

18 years agoMake sure ng_fec_init() uses the same calling convention as the rest of
emax [Thu, 25 Aug 2005 17:00:02 +0000 (17:00 +0000)]
Make sure ng_fec_init() uses the same calling convention as the rest of
the code, i.e. ng_fec_init() is called with the ifp->if_softc pointer and
NOT with the ifp pointer.

PR: kern/85239
Reviewed by: brooks
MFC after: 1 day

18 years agoDont set default mode to ATA_DMA_MAX on devices not capable of DMA.
sos [Thu, 25 Aug 2005 15:45:03 +0000 (15:45 +0000)]
Dont set default mode to ATA_DMA_MAX on devices not capable of DMA.

18 years agoFixes for gcc 4.x.
roberto [Thu, 25 Aug 2005 14:09:35 +0000 (14:09 +0000)]
Fixes for gcc 4.x.

PR:             bin/84995
Submitted by:   Divacky Roman <xdivac02@stud.fit.vutbr.cz>

18 years ago- Refuse hashsize of 0, since it is invalid.
glebius [Thu, 25 Aug 2005 13:57:00 +0000 (13:57 +0000)]
- Refuse hashsize of 0, since it is invalid.
- Use defined constant instead of 512.

18 years agoRemove all references to T/TCP, which was removed several months ago.
glebius [Thu, 25 Aug 2005 13:47:41 +0000 (13:47 +0000)]
Remove all references to T/TCP, which was removed several months ago.

Approved by: andre

18 years agoFixes for gcc4.x.
roberto [Thu, 25 Aug 2005 13:44:02 +0000 (13:44 +0000)]
Fixes for gcc4.x.

Submitted by:   Divacky Roman <xdivac02@stud.fit.vutbr.cz>
PR:             bin/84991

18 years agoDe-spl parts of the routing socket code now generally protected
rwatson [Thu, 25 Aug 2005 13:30:04 +0000 (13:30 +0000)]
De-spl parts of the routing socket code now generally protected
through locking; leave some spl references around code where there
are open questions about global variable references.  Also, add
an XXX regarding locking in sysctl.

MFC after: 3 days

18 years agoWhen we have a published ARP entry for some IP address, do reply on
glebius [Thu, 25 Aug 2005 13:25:57 +0000 (13:25 +0000)]
When we have a published ARP entry for some IP address, do reply on
ARP requests only on the network where this IP address belong, to.

Before this change we did replied on all interfaces. This could
lead to an IP address conflict with host we are doing ARP proxy
for.

PR: kern/75634
Reviewed by: andre

18 years agoget current temperature from _TMP during passive cooling is active.
ume [Thu, 25 Aug 2005 11:31:30 +0000 (11:31 +0000)]
get current temperature from _TMP during passive cooling is active.
it makes CPU freq transition smooth.

18 years agoinitialize only ACPI_BUFFER to avoid race condition with passive
ume [Thu, 25 Aug 2005 10:50:36 +0000 (10:50 +0000)]
initialize only ACPI_BUFFER to avoid race condition with passive
cooling thread which refers psv, tc1, tc2 and tsp.  The previous
code made the period where sc->tz_zone.tsp was zero, and it caused
panic at msleep().

Reported by: keramida
Tested by: keramida

18 years agoHook getino.3 up to the build and link it to putino.3.
trhodes [Thu, 25 Aug 2005 10:22:29 +0000 (10:22 +0000)]
Hook getino.3 up to the build and link it to putino.3.

PR: 83820

18 years agoBackout revision 1.54, because it exposes a worse problem, than
glebius [Thu, 25 Aug 2005 07:21:15 +0000 (07:21 +0000)]
Backout revision 1.54, because it exposes a worse problem, than
it fixes. I believe the problem lives somewhere outside ng_ksocket,
but until it is found, let the node be working.

PR: kern/84952
PR: kern/82413
MFC after: 3 days

18 years agoTrack all lock relationships instead of pruning direct relationships
truckman [Thu, 25 Aug 2005 03:47:37 +0000 (03:47 +0000)]
Track all lock relationships instead of pruning direct relationships
if an indirect relationship exists (keep both A->B->C and A->C).
This allows witness_checkorder() to use isitmychild() instead of
the much more expensive isitmydescendant() to check for valid lock
ordering.

Don't do an expensive tree walk to update the w_level values when
the tree is updated.  Only update the w_level values when using the
debugger to display the tree.

Nuke the experimental "witness_watch > 1" mode that only compared
w_level for the two locks.  This information is no longer maintained
at run time, and the use of isitmychild() in witness_checkorder
should bring performance close enough to the acceptable level that
this hack is not needed.

Report witness data structure allocation statistics under the
debug.witness sysctl.

Reviewed by: jhb
MFC after: 30 days

18 years ago- Remove redundant assertions that the driver lock is not held in attach()
jhb [Wed, 24 Aug 2005 20:28:56 +0000 (20:28 +0000)]
- Remove redundant assertions that the driver lock is not held in attach()
  and detach() since mtx_lock() will assert that already since the driver
  lock is not recursive.
- Move the call to callout_init_mtx() before hme_stop() so that the
  callout_stop() in hme_stop() doesn't operate on an uninitialized callout
  structure during attach.

Reported by: yongari (2)
MFC after: 3 days

18 years agoTest last minute changes, as gcc isn't too smart.
pjd [Wed, 24 Aug 2005 19:42:40 +0000 (19:42 +0000)]
Test last minute changes, as gcc isn't too smart.

Reported by: Steve Kargl <sgk@troutmask.apl.washington.edu>

18 years ago'-F' option now needs locked pidfile. Modify regression tests respectively.
pjd [Wed, 24 Aug 2005 19:39:29 +0000 (19:39 +0000)]
'-F' option now needs locked pidfile. Modify regression tests respectively.

18 years agoModify '-F' option to work nicely with pidfile(3) - a pidfile given as
pjd [Wed, 24 Aug 2005 19:38:28 +0000 (19:38 +0000)]
Modify '-F' option to work nicely with pidfile(3) - a pidfile given as
an argument has to be locked.

18 years agoUse pidfile(3) in watchdogd(8).
pjd [Wed, 24 Aug 2005 19:28:33 +0000 (19:28 +0000)]
Use pidfile(3) in watchdogd(8).

18 years agoUse pidfile(3) in mountd(8). There is no need to use /var/run/mountd.lock
pjd [Wed, 24 Aug 2005 19:17:06 +0000 (19:17 +0000)]
Use pidfile(3) in mountd(8). There is no need to use /var/run/mountd.lock
anymore.

18 years agoUse pidfile(3) in inetd(8).
pjd [Wed, 24 Aug 2005 19:04:21 +0000 (19:04 +0000)]
Use pidfile(3) in inetd(8).

18 years agoUse pidfile(3) in cron(8).
pjd [Wed, 24 Aug 2005 17:51:36 +0000 (17:51 +0000)]
Use pidfile(3) in cron(8).

Note, that when cron(8) cannot create pidfile, it'll exit. I didn't
changed this behaviour, but its better to ignore errors other than
EEXIST, so daemon can be started on systems where /var/ file system
doesn't support locking (like NFS without rpc.lockd(8)).

18 years agoAbout life
wilko [Wed, 24 Aug 2005 17:45:09 +0000 (17:45 +0000)]
About life

18 years agoAdd '-P' option which allows to specify pidfile.
pjd [Wed, 24 Aug 2005 17:32:41 +0000 (17:32 +0000)]
Add '-P' option which allows to specify pidfile.

18 years agoUse pidfile(3) in moused(8).
pjd [Wed, 24 Aug 2005 17:27:06 +0000 (17:27 +0000)]
Use pidfile(3) in moused(8).

18 years agoUse pidfile(3) in syslogd(8).
pjd [Wed, 24 Aug 2005 17:26:26 +0000 (17:26 +0000)]
Use pidfile(3) in syslogd(8).

18 years agoTeach daemon(8) how to use pidfile(3).
pjd [Wed, 24 Aug 2005 17:24:39 +0000 (17:24 +0000)]
Teach daemon(8) how to use pidfile(3).

18 years agoAdd a family of functions for reliable pidfiles handling.
pjd [Wed, 24 Aug 2005 17:21:38 +0000 (17:21 +0000)]
Add a family of functions for reliable pidfiles handling.

Idea from: jmg
Discussed on: arch@

18 years agoStop hard-coding an -M flag to mdmfs(8) in /etc/rc.subr.
yar [Wed, 24 Aug 2005 16:25:47 +0000 (16:25 +0000)]
Stop hard-coding an -M flag to mdmfs(8) in /etc/rc.subr.
Now this flag can be set, or not set, for memory-backed
file systems on individual basis, as illustrated by the
rc.conf(5) variables tmpmfs_flags and varmfs_flags.  The
flag is set for those FS'en by default, in /etc/defaults/rc.conf,
in order to stay compatible with the old rc.subr behaviour.

Submitted by: marck
MFC after: 3 days

18 years ago- Fix checking range of strings of struct iconv_add_in in libsmb and libkiconv,
imura [Wed, 24 Aug 2005 12:38:26 +0000 (12:38 +0000)]
- Fix checking range of strings of struct iconv_add_in in libsmb and libkiconv,
- Add checking range of strings to iconv_sysctl_add().

Submitted by: Rudolf Cejka

18 years agoIgnore HTTP_PROXY if it is defined but empty. This was already handled
des [Wed, 24 Aug 2005 12:28:05 +0000 (12:28 +0000)]
Ignore HTTP_PROXY if it is defined but empty.  This was already handled
correctly in the case of FTP_PROXY, because an empty FTP_PROXY has a
specific meaning ("don't use any proxy at all for ftp, even if HTTP_PROXY
is defined"), while an empty HTTP_PROXY has no meaning at all.

PR: bin/85185
Submitted by: Conall O'Brien <conallob=freebsd@maths.tcd.ie>
MFC after: 2 weeks

18 years agoList -W as one of the meaningful options to the -i (interfaces)
yar [Wed, 24 Aug 2005 12:21:34 +0000 (12:21 +0000)]
List -W as one of the meaningful options to the -i (interfaces)
display of netstat(1).

MFC after: 3 days

18 years agoChange the default adaptive algorithm for phk's one. Thanks to phk
bruno [Wed, 24 Aug 2005 07:52:59 +0000 (07:52 +0000)]
Change the default adaptive algorithm for phk's one.  Thanks to phk
and Kevin Oberman for this work.

Submitted by: Kevin Oberman
Reviewed by: njl
Approved by: njl

18 years agoRemove a KASSERT in the sack path that fails because of a interaction
ps [Wed, 24 Aug 2005 02:48:45 +0000 (02:48 +0000)]
Remove a KASSERT in the sack path that fails because of a interaction
between sack and a bug in the "bad retransmit recovery" logic. This is
a workaround, the underlying bug will be fixed later.

Submitted by:   Mohan Srinivasan, Noritoshi Demizu

18 years agoFix up the comment for MAX_SACK_BLKS.
ps [Wed, 24 Aug 2005 02:47:16 +0000 (02:47 +0000)]
Fix up the comment for MAX_SACK_BLKS.

Submitted by: Noritoshi Demizu

18 years ago- Remove NTP servers which do not resolve in DNS.
rodrigc [Wed, 24 Aug 2005 02:21:12 +0000 (02:21 +0000)]
- Remove NTP servers which do not resolve in DNS.
- Use pool.ntp.org servers where possible, thanks to
  Chuck Swiger <cswiger at mac dot com> .
- Update list of Swedish NTP servers, thanks to
  Fredrik Lindberg <fli+freebsd-current at shapeshifter dot se> .

PR: bin/75479
MFC after: 1 day

18 years ago- Remove the removable_interfaces variable. /etc/pccard_ether will
brooks [Wed, 24 Aug 2005 01:23:49 +0000 (01:23 +0000)]
- Remove the removable_interfaces variable.  /etc/pccard_ether will
  now run on any interface.
- Add a new ifconfig_<ifn> keyword, NOAUTO which prevents configuration
  of an interface at boot or via /etc/pccard_ether.  This allows
  /etc/rc.d/netif to be used to start and stop an interface on a purely
  manual basis.  The decision to affect pccard_ether may be revisited at
  a later date.

Requested by: imp, gallatin (removable_interfaces)
Discussed with: sam, Randy Bush (NOAUTO)

18 years agoMFOpenBSD rev 1.9: fix a buffer overflow when processing config file
brooks [Wed, 24 Aug 2005 00:05:04 +0000 (00:05 +0000)]
MFOpenBSD rev 1.9: fix a buffer overflow when processing config file
lines that are exactly 81 characters in length.

Obtained from: OpenBSD
MFC After: 3 days

18 years agoAdd __FBSDID to all .c files in dhclient to aid in determining file
brooks [Tue, 23 Aug 2005 23:59:55 +0000 (23:59 +0000)]
Add __FBSDID to all .c files in dhclient to aid in determining file
versions when dealing with user problems.

18 years agoProvide the USB device release number along with other parameters
iedowse [Tue, 23 Aug 2005 21:32:49 +0000 (21:32 +0000)]
Provide the USB device release number along with other parameters
so that devd can match on it. This field was already available to
usbd and is used by a number of usbd.conf entries, so now it is
possible to transfer those entries to devd.conf.

Submitted by: Anish Mistry

18 years agoEnd the MALLOC_DEFINE macro without the semi-colon, the caller supplies
phk [Tue, 23 Aug 2005 20:31:21 +0000 (20:31 +0000)]
End the MALLOC_DEFINE macro without the semi-colon, the caller supplies
that.

Spotted by: Flexelint

18 years agoThe mtu check in bridge_enqueue is bogus as the maximum Ethernet frame is
thompsa [Tue, 23 Aug 2005 19:49:00 +0000 (19:49 +0000)]
The mtu check in bridge_enqueue is bogus as the maximum Ethernet frame is
actually 1514, so comparing the mbuf length which includes the Ethernet header
to the interface MTU is wrong.

The check was a little over the top so just remove it.

Approved by: mlaier (mentor)
MFC after: 3 days

18 years agoVerify if we can actually read the data at given offset.
pjd [Tue, 23 Aug 2005 18:55:38 +0000 (18:55 +0000)]
Verify if we can actually read the data at given offset.

Reported by: Martin <nakal@nurfuerspam.de>

18 years ago- Document the led(4) interface for the Thinklight
markus [Tue, 23 Aug 2005 18:34:39 +0000 (18:34 +0000)]
- Document the led(4) interface for the Thinklight
- Bump .Dd

Approved by: brueffer
MFC after: 3 days

18 years agoDocument the diagnostic message printed at startup time. Keep the
jkoshy [Tue, 23 Aug 2005 17:18:27 +0000 (17:18 +0000)]
Document the diagnostic message printed at startup time.  Keep the
list of diagnostic messages sorted.

Document the recently introduced EOPNOTSUPP error return.  Repair
sort ordering for the list of error descriptions.

MFC after: 3 days

18 years agoAdd documentation for the BIOCLOCK and BIOCSETWF ioctl commands. Also
csjp [Tue, 23 Aug 2005 17:08:59 +0000 (17:08 +0000)]
Add documentation for the BIOCLOCK and BIOCSETWF ioctl commands. Also
modify the documentation for BIOCSETF to note that it sets the read
filter.

Pointed out by: simon

18 years agoRemove unnecessary IPSEC includes.
andre [Tue, 23 Aug 2005 14:42:40 +0000 (14:42 +0000)]
Remove unnecessary IPSEC includes.

MFC after: 2 weeks
Sponsored by: TCP/IP Optimization Fundraise 2005

18 years agoDon't loop back packets that have been routed by pf. This fixes an endless
mlaier [Tue, 23 Aug 2005 14:13:17 +0000 (14:13 +0000)]
Don't loop back packets that have been routed by pf.  This fixes an endless
loop where the same packet is sent over and over again.

Obtained from: OpenBSD
Reported by: Sergey Lapin
Tested by: Sergey Lapin
MFC after: 7 days

18 years agoAdd a -h option to tell cmp not to follow symbolic links.
brian [Tue, 23 Aug 2005 13:13:13 +0000 (13:13 +0000)]
Add a -h option to tell cmp not to follow symbolic links.

MFC after: 3 weeks
Sponsored by: Sophos/ActiveState

18 years agoApply fix for "pr82261 DMA-support on Sparc64 broken"
sos [Tue, 23 Aug 2005 08:53:01 +0000 (08:53 +0000)]
Apply fix for "pr82261 DMA-support on Sparc64 broken"
The Acer chip or wiring that SUN uses has problems that this patch
tries to work around.
Original patch by Marius Strobl, hacked into shape by me..

18 years agoFix a couple of typos
brian [Tue, 23 Aug 2005 07:58:55 +0000 (07:58 +0000)]
Fix a couple of typos

18 years agoBack out the removal of LK_NOWAIT from the VOP_LOCK() call in
truckman [Tue, 23 Aug 2005 03:44:06 +0000 (03:44 +0000)]
Back out the removal of LK_NOWAIT from the VOP_LOCK() call in
vlrureclaim() in vfs_subr.c 1.636  because waiting for the vnode
lock aggravates an existing race condition.  It is also undesirable
according to the commit log for 1.631.

Fix the tiny race condition that remains by rechecking the vnode
state after grabbing the vnode lock and grabbing the vnode interlock.

Fix the problem of other threads being starved (which 1.636 attempted
to fix by removing LK_NOWAIT) by calling uio_yield() periodically
in vlrureclaim().  This should be more deterministic than hoping
that VOP_LOCK() without LK_NOWAIT will block, which may not happen
in this loop.

Reviewed by: kan
MFC after: 5 days

18 years agoFreeBSD unconditionally supports write filters now.
csjp [Tue, 23 Aug 2005 01:35:38 +0000 (01:35 +0000)]
FreeBSD unconditionally supports write filters now.

18 years agoFix multiple typos in the mutex names. This fixes false positive (and pretty
emax [Tue, 23 Aug 2005 00:50:59 +0000 (00:50 +0000)]
Fix multiple typos in the mutex names. This fixes false positive (and pretty
strange looking too) LORs I have seen on my system. Pointy hat to goes to me.

MFC after: 1 day

18 years agoAdd support for processing the "bd_locked" flag offered by the bpf
csjp [Tue, 23 Aug 2005 00:06:04 +0000 (00:06 +0000)]
Add support for processing the "bd_locked" flag offered by the bpf
stats structure.

18 years agoFreeBSD now supports BIOCLOCK. So we can use it now.
csjp [Tue, 23 Aug 2005 00:03:58 +0000 (00:03 +0000)]
FreeBSD now supports BIOCLOCK. So we can use it now.

Reviewed by: mlaier

18 years agoCorrect the check if a plex is accessible in case it is not up.
le [Mon, 22 Aug 2005 23:24:26 +0000 (23:24 +0000)]
Correct the check if a plex is accessible in case it is not up.
This makes degraded RAID5 plexes actually work.

18 years agoo Fix a logic error when not doing mbuf cluster allocation.
andre [Mon, 22 Aug 2005 22:13:41 +0000 (22:13 +0000)]
o Fix a logic error when not doing mbuf cluster allocation.
o Change an old panic() to a clean function exit.

MFC after: 2 weeks
Sponsored by: TCP/IP Optimization Fundraise 2005

18 years agoPass the PDE from pmap_remove() to pmap_remove_page() so that the latter
alc [Mon, 22 Aug 2005 20:02:40 +0000 (20:02 +0000)]
Pass the PDE from pmap_remove() to pmap_remove_page() so that the latter
procedure doesn't have to recompute it.

18 years agoIntroduce two new ioctl(2) commands, BIOCLOCK and BIOCSETWF. These commands
csjp [Mon, 22 Aug 2005 19:35:48 +0000 (19:35 +0000)]
Introduce two new ioctl(2) commands, BIOCLOCK and BIOCSETWF. These commands
enhance the security of bpf(4) by further relinquishing the privilege of
the bpf(4) consumer (assuming the ioctl commands are being implemented).

Once BIOCLOCK is executed, the device becomes locked which prevents the
execution of ioctl(2) commands which can change the underly parameters of the
bpf(4) device. An example might be the setting of bpf(4) filter programs or
attaching to different network interfaces.

BIOCSETWF can be used to set write filters for outgoing packets. Currently if
a bpf(4) consumer is compromised, the bpf(4) descriptor can essentially be used
as a raw socket, regardless of consumer's UID. Write filters give users the
ability to constrain which packets can be sent through the bpf(4) descriptor.

These features are currently implemented by a couple programs which came from
OpenBSD, such as the new dhclient and pflogd.

-Modify bpf_setf(9) to accept a "cmd" parameter. This will be used to specify
 whether a read or write filter is to be set.
-Add a bpf(4) filter program as a parameter to bpf_movein(9) as we will run the
 filter program on the mbuf data once we move the packet in from user-space.
-Rather than execute two uiomove operations, (one for the link header and the
 other for the packet data), execute one and manually copy the linker header
 into the sockaddr structure via bcopy.
-Restructure bpf_setf to compensate for write filters, as well as read.
-Adjust bpf(4) stats structures to include a bd_locked member.

It should be noted that the FreeBSD and OpenBSD implementations differ a bit in
the sense that we unconditionally enforce the lock, where OpenBSD enforces it
only if the calling credential is not root.

Idea from: OpenBSD
Reviewed by: mlaier

18 years agoOn x86 processors, turn off any 'INTERRUPT' capabilities on PMCs
jkoshy [Mon, 22 Aug 2005 18:20:41 +0000 (18:20 +0000)]
On x86 processors, turn off any 'INTERRUPT' capabilities on PMCs
if the CPU does not have its local APIC enabled.

MFC after: 3 days

18 years agoReturn EOPNOTSUPP instead of EINVAL if a PMC allocation request
jkoshy [Mon, 22 Aug 2005 18:18:20 +0000 (18:18 +0000)]
Return EOPNOTSUPP instead of EINVAL if a PMC allocation request
specifies a PMC capability (e.g., sampling) that is not supported
by hardware.  Return EINVAL early if the PMC class passed in is
not recognized.

MFC after: 3 days

18 years agoPrint PMC capabilities at module load time.
jkoshy [Mon, 22 Aug 2005 17:51:08 +0000 (17:51 +0000)]
Print PMC capabilities at module load time.

MFC after: 3 days

18 years agoDocument IP_MINTTL socket option.
andre [Mon, 22 Aug 2005 16:14:53 +0000 (16:14 +0000)]
Document IP_MINTTL socket option.

MFC after: 2 weeks
Sponsored by: TCP/IP Optimization Fundraise 2005

18 years agoAdd socketoption IP_MINTTL. May be used to set the minimum acceptable
andre [Mon, 22 Aug 2005 16:13:08 +0000 (16:13 +0000)]
Add socketoption IP_MINTTL.  May be used to set the minimum acceptable
TTL a packet must have when received on a socket.  All packets with a
lower TTL are silently dropped.  Works on already connected/connecting
and listening sockets for RAW/UDP/TCP.

This option is only really useful when set to 255 preventing packets
from outside the directly connected networks reaching local listeners
on sockets.

Allows userland implementation of 'The Generalized TTL Security Mechanism
(GTSM)' according to RFC3682.  Examples of such use include the Cisco IOS
BGP implementation command "neighbor ttl-security".

MFC after: 2 weeks
Sponsored by: TCP/IP Optimization Fundraise 2005

18 years agoAlways quote the entire TCP header when responding and allocate an mbuf
andre [Mon, 22 Aug 2005 14:12:18 +0000 (14:12 +0000)]
Always quote the entire TCP header when responding and allocate an mbuf
cluster if needed.

Fixes the TCP issues raised in I-D draft-gont-icmp-payload-00.txt.

This aids in-the-wild debugging a lot and allows the receiver to do
more elaborate checks on the validity of the response.

MFC after: 2 weeks
Sponsored by: TCP/IP Optimization Fundraise 2005