]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
17 years agoFix a bug in 1.40 - it missed three occurences in pkg_info which leads to
pav [Wed, 7 Feb 2007 19:44:44 +0000 (19:44 +0000)]
Fix a bug in 1.40 - it missed three occurences in pkg_info which leads to
(null)/file output.

MFC after: 1 week

17 years agoEvolve the ctlreq interface added to geom_gpt into a generic
marcel [Wed, 7 Feb 2007 18:55:31 +0000 (18:55 +0000)]
Evolve the ctlreq interface added to geom_gpt into a generic
partitioning class that supports multiple schemes. Current
schemes supported are APM (Apple Partition Map) and GPT.
Change all GEOM_APPLE anf GEOM_GPT options into GEOM_PART_APM
and GEOM_PART_GPT (resp).

The ctlreq interface supports verbs to create and destroy
partitioning schemes on a disk; to add, delete and modify
partitions; and to commit or undo changes made.

17 years ago- Move 'struct swdevt' back into swap_pager.h and expose it to userland.
jhb [Wed, 7 Feb 2007 17:43:11 +0000 (17:43 +0000)]
- Move 'struct swdevt' back into swap_pager.h and expose it to userland.
- Restore support for fetching swap information from crash dumps via
  kvm_get_swapinfo(3) to fix pstat -T/-s on crash dumps.

Reviewed by: arch@, phk
MFC after: 1 week

17 years agoRemove support for IPIP tunnels in IPv4 multicast forwarding. XORP has
bms [Wed, 7 Feb 2007 16:04:13 +0000 (16:04 +0000)]
Remove support for IPIP tunnels in IPv4 multicast forwarding. XORP has
never used them; with mrouted, their functionality may be replaced by
explicitly configuring gif(4) instances and specifying them with the
'phyint' keyword.

Bump __FreeBSD_version to 700030, and update UPDATING.
A doc update is forthcoming.

Discussed on: net
Reviewed by: fenner
MFC after: 3 months

17 years agoFix the race of dereferencing /proc/<pid>/file with execve(2) by caching
kib [Wed, 7 Feb 2007 10:30:49 +0000 (10:30 +0000)]
Fix the race of dereferencing /proc/<pid>/file with execve(2) by caching
the value of p_textvp. This way, we always unlock the locked vnode.
While there, vhold() the vnode around the vn_lock().

Reported and tested by: Guy Helmer (ghelmer palisadesys com)
Approved by: des (procfs maintainer)
MFC after: 1 week

17 years agoChange the pagedaemon, vm_wait(), and vm_waitpfault() to sleep on the
alc [Wed, 7 Feb 2007 06:37:30 +0000 (06:37 +0000)]
Change the pagedaemon, vm_wait(), and vm_waitpfault() to sleep on the
vm page queue free mutex instead of the vm page queue mutex.

17 years agoRemove the vm page queue free mutex from the CDEV order.
alc [Wed, 7 Feb 2007 05:43:31 +0000 (05:43 +0000)]
Remove the vm page queue free mutex from the CDEV order.

17 years agoMake iostat(8) fully work on crash dumps again (broken since 5.0):
jhb [Tue, 6 Feb 2007 20:29:40 +0000 (20:29 +0000)]
Make iostat(8) fully work on crash dumps again (broken since 5.0):
- Pass the address of the variable we are reading to kvm_read() rather
  than the index into the nlist array.
- Properly report errors from kvm_read() which returns -1 on error, not
  0.

MFC after: 3 days

17 years agoFixed some style bugs. Routine except:
bde [Tue, 6 Feb 2007 18:04:02 +0000 (18:04 +0000)]
Fixed some style bugs.  Routine except:
- don't use __GNUCLIKE___OFFSETOF, since __offsetof() is a standard
  FreeBSD implementaion detail which has nothing to do with GNUC.

17 years agoAllow to use umastat on coredumps.
pjd [Tue, 6 Feb 2007 17:57:20 +0000 (17:57 +0000)]
Allow to use umastat on coredumps.

Reviewed by: rwatson

17 years agoPrint intptr_t values by first casting to intmax_t and then printing with
rwatson [Tue, 6 Feb 2007 17:22:36 +0000 (17:22 +0000)]
Print intptr_t values by first casting to intmax_t and then printing with
%jd, as intptr_t may not be int-sized.

Assistance from: jhb
Spotted by: Mr Tinderbox

17 years agoUpdate comments in mac.h.
rwatson [Tue, 6 Feb 2007 16:24:57 +0000 (16:24 +0000)]
Update comments in mac.h.

Obtained from: TrustedBSD Project

17 years agoSimplified PCPU_GET() and PCPU_SET(). We must copy through a temporary
bde [Tue, 6 Feb 2007 16:21:09 +0000 (16:21 +0000)]
Simplified PCPU_GET() and PCPU_SET().  We must copy through a temporary
variable to avoid invalid constraints in dead code.  Use an array of
u_char's (inside a struct) instead of a char/short/int/long variable so
that the variable and its accesses can be spelled in the same way in all
cases and code doesn't need to be cloned just to hold the spelling
differences.

Fixed strict-aliasing errors in PCPU_SET() and in the amd64 PCPU_GET().
Cast to (void *) as in rev.1.37 of the i386 version where the errors
were fixed for the i386 PCPU_GET() only.  It would be more correct to
copy to and from the temp. variable using memcpy(), but then an
ifdef tangle would be required to ensure using the builtin memcpy().
We depend on fairly aggressive optimization to put the temp. variable
only in a register despite it being copied using
*(type *)(void *)&anothertype and could depend on this when using
memcpy() too.  This seems to work right even for -O0, but the -O0 case
has not been completely tested.

This change gives identical object code for all object files in LINT
on amd64 (except for one file with a __TIME__ stamp).  For LINT on
i386 it gives unimportant differences in instruction order and padding
in a few object files.  This was only tested for -O.

This change (actually a previous version of it) gives the following
reductions in the number of object files in LINT that fail to compile
with -O2 but without the -fno-strict-aliasing kludge:
- amd64: 29 (down from 211)
- i386: 36 (down from 47)

gcc-3.4.6 actually allows the invalid constraints that result from not
using the temp. variable, at least with -O[1-2], but gcc-3.3.3 crashes
on them and I don't want to depend on compiler bugs.

17 years agoPush UNIX domain socket locking further into uipc_ctloutput() in order to
rwatson [Tue, 6 Feb 2007 14:31:37 +0000 (14:31 +0000)]
Push UNIX domain socket locking further into uipc_ctloutput() in order to
avoid holding the UNIX domain socket subsystem lock over soooptcopyin()
and sooptcopyout().  This problem was introduced when LOCAL_CREDS, and
LOCAL_CONNWAIT support were added.

Reviewed by: mdodd

17 years agoIntroduce accessor functions mac_label_get() and mac_label_set() to replace
rwatson [Tue, 6 Feb 2007 14:19:25 +0000 (14:19 +0000)]
Introduce accessor functions mac_label_get() and mac_label_set() to replace
LABEL_TO_SLOT() macro used by policy modules to query and set label data
in struct label.  Instead of using a union, store an intptr_t, simplifying
the API.

Update policies: in most cases this required only small tweaks to current
wrapper macros.  In two cases, a single wrapper macros had to be split into
separate get and set macros.

Move struct label definition from _label.h to mac_internal.h and remove
_label.h.  With this change, policies may now treat struct label * as
opaque, allowing us to change the layout of struct label without breaking
the policy module ABI.  For example, we could make the maximum number of
policies with labels modifiable at boot-time rather than just at
compile-time.

Obtained from: TrustedBSD Project

17 years agoat91_twi depends on the iicbus module to satisfy its symbols when
imp [Tue, 6 Feb 2007 12:07:14 +0000 (12:07 +0000)]
at91_twi depends on the iicbus module to satisfy its symbols when
loaded, so make that explicit.  Works for the monolithic kernel case,
won't work for the kldload case.

17 years agoContinue 7-CURRENT MAC Framework rearrangement and cleanup:
rwatson [Tue, 6 Feb 2007 10:59:23 +0000 (10:59 +0000)]
Continue 7-CURRENT MAC Framework rearrangement and cleanup:

Don't perform a nested include of _label.h in mac.h, as mac.h now
describes only  the user API to MAC, and _label.h defines the in-kernel
representation of MAC labels.

Remove mac.h includes from policies and MAC framework components that do
not use userspace MAC API definitions.

Add _KERNEL inclusion checks to mac_internal.h and mac_policy.h, as these
are kernel-only include files

Obtained from: TrustedBSD Project

17 years agoDocument NetCell NC3000 and NC5000 support.
brueffer [Tue, 6 Feb 2007 09:50:17 +0000 (09:50 +0000)]
Document NetCell NC3000 and NC5000 support.

17 years agogetopt(3) returns -1, not EOF.
kevlo [Tue, 6 Feb 2007 08:48:28 +0000 (08:48 +0000)]
getopt(3) returns -1, not EOF.

17 years ago- Bump document date.
ru [Tue, 6 Feb 2007 08:46:20 +0000 (08:46 +0000)]
- Bump document date.
- Kill whitespace at EOL.
- Add missing markup bit.

17 years agoPrint warning that "-t msdos" is deprecated and being converted to
rodrigc [Tue, 6 Feb 2007 05:57:40 +0000 (05:57 +0000)]
Print warning that "-t msdos" is deprecated and being converted to
"-t msdosfs".  The conversion has been happening since 1.43, but
no equivalent conversion happens in "umount -t", which led to some
confusion with some users.

PR: 79296
Submitted by: Nobuhiro Yasutomi <nobuhiro yasutomi nifty ne jp>

17 years agoThe change to the vm_page_queue_freelist lock from a spin lock to a
mpp [Tue, 6 Feb 2007 05:51:55 +0000 (05:51 +0000)]
The change to the vm_page_queue_freelist lock from a spin lock to a
sleep lock missed the witness code, and the system will panic
immediately on boot if WITNESS is enabled.

Changed the witness definition to the new type.

17 years agoEliminate some dead code which was introduced in 1.23, yet was always
rodrigc [Tue, 6 Feb 2007 03:30:58 +0000 (03:30 +0000)]
Eliminate some dead code which was introduced in 1.23, yet was always
commented out.

17 years agos/Feb/February/
ambrisko [Mon, 5 Feb 2007 22:45:58 +0000 (22:45 +0000)]
s/Feb/February/

Reminded by: ru

17 years agoChange GDB_BUFSZ to be large enough to hold a register dump where each
jhb [Mon, 5 Feb 2007 21:48:32 +0000 (21:48 +0000)]
Change GDB_BUFSZ to be large enough to hold a register dump where each
register takes 16 characters (64-bit register in hex).  In practice this
is a slight bit of overkill as 7 of the 56 registers are only 32-bit, but
having the buffer too small results in remote kgdb trashing kernel memory
when it connects.

PR: amd64/108673
Submitted by: Ravi Murty, Nikhil Rao @ Intel
MFC after: 3 days

17 years agoUse egrep instead of grep so that reporting of login failures (broken
jdp [Mon, 5 Feb 2007 16:36:25 +0000 (16:36 +0000)]
Use egrep instead of grep so that reporting of login failures (broken
by revision 1.6) works again.  This fix is already in RELENG_6, but was
never committed to HEAD.

17 years agoIf (a == NULL), don't dereference (a) to record an error message. [1]
cperciva [Mon, 5 Feb 2007 16:30:40 +0000 (16:30 +0000)]
If (a == NULL), don't dereference (a) to record an error message. [1]

Fallout from changing the skip API to use off_t instead of size_t: Print
the skip length using %jd and cast to (intmax_t) instead of %d / (int),
and if ARCHIVE_API_VERSION >= 2, allow the client skipper to be called
for requests longer than SSIZE_MAX. [2]

Approved by: kientzle
Pointy hats to: kientzle [1], cperciva [2]
MFC after: 3 days

17 years agoFix devfs cloning for non-superusers when net.link.tap.user_open is non-zero.
bms [Mon, 5 Feb 2007 11:29:08 +0000 (11:29 +0000)]
Fix devfs cloning for non-superusers when net.link.tap.user_open is non-zero.
Note: 'ifconfig tapX create' still requires PRIV_NET_IFCREATE privilege.

Reviewed by: rwatson

17 years agoForced commit; Vim ate my homework^Wkeystroke.
bms [Mon, 5 Feb 2007 11:18:47 +0000 (11:18 +0000)]
Forced commit; Vim ate my homework^Wkeystroke.

Fix an incorrect TCP-MD5 key length check for the !FAST_IPSEC case.

PR: 104422, 107520
MFC after: 3 days

17 years agoClean up after tun(4) properly; remove routes whose ifp is set to
bms [Mon, 5 Feb 2007 11:15:52 +0000 (11:15 +0000)]
Clean up after tun(4) properly; remove routes whose ifp is set to
that of the tun instance even for the !AF_INET case, and properly
remove configured addresses by calling if_purgeaddrs().

Maintain the TUN_DSTADDR behaviour for compatibility with the OS/390
emulator.

MFC after: 3 weeks
PR: 100080
Reviewed by: bz

17 years agoMFC after: 3 days
bms [Mon, 5 Feb 2007 11:05:41 +0000 (11:05 +0000)]
MFC after: 3 days

17 years ago<sys/sx.h> is unneeded.
kevlo [Mon, 5 Feb 2007 10:33:39 +0000 (10:33 +0000)]
<sys/sx.h> is unneeded.

17 years agogetopt(3) returns -1, not EOF when out of args.
kevlo [Mon, 5 Feb 2007 07:35:23 +0000 (07:35 +0000)]
getopt(3) returns -1, not EOF when out of args.

17 years agoChange the free page queue lock from a spin mutex to a default (blocking)
alc [Mon, 5 Feb 2007 06:02:55 +0000 (06:02 +0000)]
Change the free page queue lock from a spin mutex to a default (blocking)
mutex.  With the demise of Alpha support, there is no longer a reason for
it to be a spin mutex.

17 years agoWhen fast-forwarding is enabled, do not forward directed IPv4 broadcasts
bms [Mon, 5 Feb 2007 00:15:40 +0000 (00:15 +0000)]
When fast-forwarding is enabled, do not forward directed IPv4 broadcasts
to locally attached broadcast networks.

Note well: This relies on the layer 2 route cloning behaviour in BSD.

PR: 98799
Tested by: Dmitry Sergienko
MFC after: 1 week

17 years agoCall pbgetvp() and pbrelvp() instead of setting b_vp directly.
tegge [Sun, 4 Feb 2007 23:42:02 +0000 (23:42 +0000)]
Call pbgetvp() and pbrelvp() instead of setting b_vp directly.

PR: kern/108151

17 years agoAdd support for another 3G card and update man page accordingly.
le [Sun, 4 Feb 2007 22:14:18 +0000 (22:14 +0000)]
Add support for another 3G card and update man page accordingly.
The patch from the PR was a little outdated w/regards to the
Vodafone vendor string.

PR:            kern/106033
Submitted by:  Volker Werth <volker_AT_vwsoft.com>
MFC in:        3 days

17 years agocleanup code: remove superfluous comma at end of enumeration
rse [Sun, 4 Feb 2007 20:52:57 +0000 (20:52 +0000)]
cleanup code: remove superfluous comma at end of enumeration
declaration, remove useless "break" after exit(3) call, and add a
missing va_end(3) call.

17 years agocleanup code: remove unnecessary and useless void cast
rse [Sun, 4 Feb 2007 20:07:07 +0000 (20:07 +0000)]
cleanup code: remove unnecessary and useless void cast
from void-function skip_string().

17 years agoCorrect parser by using intended C equality ("==") instead of
rse [Sun, 4 Feb 2007 20:06:10 +0000 (20:06 +0000)]
Correct parser by using intended C equality ("==") instead of
assignment ("=") operator.

17 years agofix bug: avoid dereferencing content of an already free(3)'ed chunk
rse [Sun, 4 Feb 2007 20:04:29 +0000 (20:04 +0000)]
fix bug: avoid dereferencing content of an already free(3)'ed chunk

17 years agoFix hr.iso syscons keymap, making it possible to type < and >.
philip [Sun, 4 Feb 2007 17:10:18 +0000 (17:10 +0000)]
Fix hr.iso syscons keymap, making it possible to type < and >.

PR: conf/105642
Submitted by: ivoras
MFC after: 3 days

17 years agoTypo.
bms [Sun, 4 Feb 2007 16:59:50 +0000 (16:59 +0000)]
Typo.
(Oh well, I guess that's the danger of updating two three-letter-named
entities at the same time.)

Submitted by: Simon L. Nielsen
MFC after: 4 weeks

17 years agoBe explicit in examples about the correct grammar for 'alias' and
bms [Sun, 4 Feb 2007 16:48:56 +0000 (16:48 +0000)]
Be explicit in examples about the correct grammar for 'alias' and
'-alias', and that 'add' and 'delete are in fact synonyms for these
in the ifconfig(8) grammar.

Use network prefixes explicitly specified in IETF RFCs for
documentation purposes. (bz)

PR: 102701
MFC after: 1 day
See also: RFC 3330, RFC 3849
Submitted by: bz

17 years agoImplement ifnet cloning for tun(4)/tap(4).
bms [Sun, 4 Feb 2007 16:32:46 +0000 (16:32 +0000)]
Implement ifnet cloning for tun(4)/tap(4).
Make devfs cloning a sysctl/tunable which defaults to on.

If devfs cloning is enabled, only the super-user may create
tun(4)/tap(4)/vmnet(4) instances. Devfs cloning is still enabled by
default; it may be disabled from the loader or via sysctl with
"net.link.tap.devfs_cloning" and "net.link.tun.devfs_cloning".

Disabling its use affects potentially all tun(4)/tap(4) consumers
including OpenSSH, OpenVPN and VMware.

PR: 105228 (potentially also 90413, 105570)
Submitted by: Landon Fuller
Tested by: Andrej Tobola
Approved by: core (rwatson)
MFC after: 4 weeks

17 years agoDocument that quotas must be turned off on a file system and
mpp [Sun, 4 Feb 2007 14:26:01 +0000 (14:26 +0000)]
Document that quotas must be turned off on a file system and
then turned back on in order for grace time changes to take
effect.

17 years agoIf a user is over both the soft block limit and soft i-node
mpp [Sun, 4 Feb 2007 14:06:58 +0000 (14:06 +0000)]
If a user is over both the soft block limit and soft i-node
limit, quota will report one of the grace times incorrectly.
This is due to it storing the result in a static buffer, and the
routine being called like:
printf("....", ..., timeprnt(btime), timeprnt(itime), ...)

The problem becomes very obvious if you change one of the default
grace periods to be much larger than the other one.

Changed timeprnt to dynamically allocate the string to be displayed.

17 years agoRemove all #if __FreeBSD_version checks now that RSTP support has been
syrinx [Sun, 4 Feb 2007 13:31:05 +0000 (13:31 +0000)]
Remove all #if __FreeBSD_version checks now that RSTP support has been
MFCed to RELENG_6. We no longer need that to compile the bridge module
under both RELENG_6 and CURRENT.

Approved by: bz (mentor)

17 years agoSynaptics TouchPad seems to go back to Relative Mode after the call
dumbbell [Sun, 4 Feb 2007 12:47:52 +0000 (12:47 +0000)]
Synaptics TouchPad seems to go back to Relative Mode after the call
to set_controller_command_byte() call; by issueing a Read Mode Byte
command, the touchpad is in Absolute Mode again.

This problem occursed at least on Asus V6V laptops.

17 years agoExpand this man page to provide some details on the structure
mpp [Sun, 4 Feb 2007 07:44:40 +0000 (07:44 +0000)]
Expand this man page to provide some details on the structure
of the quota data files and how they are maintained.

17 years agoOrion originally wrote and added these files in 2002/2003, so with his
joel [Sun, 4 Feb 2007 06:52:33 +0000 (06:52 +0000)]
Orion originally wrote and added these files in 2002/2003, so with his
approval, change the copyright statement to point at him instead of
"FreeBSD, Inc".

Encouraged by: rwatson
Reviewed by: imp
Discussed with and approved by: orion

17 years agoIf quotacheck or edquota reset the block or inode grace time for
mpp [Sun, 4 Feb 2007 06:46:57 +0000 (06:46 +0000)]
If quotacheck or edquota reset the block or inode grace time for
a user or group, when the kernel first sees this, it will update
the grace time value.  However, it never flags the quota as modified
and the updated value never makes it to the quota data file unless
the user actually makes some other change that would write the
data out.

Fixed to flag the quota as modified if the soft limit has actually
been reached and should be now enforced.

17 years agoDocument the init_chroot and init_script variables.
imp [Sun, 4 Feb 2007 06:35:10 +0000 (06:35 +0000)]
Document the init_chroot and init_script variables.

# I didn't check the markup too closely, so doc people, please check

Submitted by: Oliver Fromme

17 years agoIf two files systems, /a and /b are marked as having quotas enabled
mpp [Sun, 4 Feb 2007 06:33:15 +0000 (06:33 +0000)]
If two files systems, /a and /b are marked as having quotas enabled
in fstab and they are normally mounted as /a/b, if /b is not mounted,
the various quota utilities will incorrectly operate with the quotas on
/a (silently) when operations are attemted on /b.

Sync up all the hasquota() routines between all the different
quota utilities and change it to detect if the file system we are
attempting to perform quota operations on is not currently mounted
and warn the user accordingly.

PR: bin/38918

17 years agoPatches to allow one to allow one to specify a directory to chroot to.
imp [Sun, 4 Feb 2007 06:33:13 +0000 (06:33 +0000)]
Patches to allow one to allow one to specify a directory to chroot to.
This includes support for running a script to setup that directory.
The kenv variables init_chroot and init_script control this behavior,
and are documented in loader(8) that's about to be committed (along
with the other variables like init_path...).

Submitted by: Oliver Fromme
Reviewed by: myself, jhb (earlier versions)

17 years agoclear/reclaim challenge text when switching auth mode and operating as an ap
sam [Sun, 4 Feb 2007 05:49:16 +0000 (05:49 +0000)]
clear/reclaim challenge text when switching auth mode and operating as an ap

Obtained from: Atheros

17 years agoIf quotas are not currently enabled for a file system, edquota -p
mpp [Sun, 4 Feb 2007 01:41:32 +0000 (01:41 +0000)]
If quotas are not currently enabled for a file system, edquota -p
will operate directly on the quota file.  It will incorrectly write
the prototype user's usage information for each new quota it sets.

Fixed to read in the current quota information and update the
file correctly.

If quotas are enabled the kernel handles this case fine.

PR: bin/15410

17 years agoInclude opt_ipdivert.h so that the message announcing ipfw correctly
alc [Sat, 3 Feb 2007 22:11:53 +0000 (22:11 +0000)]
Include opt_ipdivert.h so that the message announcing ipfw correctly
describes the state of IPDIVERT.

17 years agoFix build (sc->dev => sc->sc_dev).
flz [Sat, 3 Feb 2007 21:11:11 +0000 (21:11 +0000)]
Fix build (sc->dev => sc->sc_dev).

17 years agoAdd support for the NetCell NC3000/5000 series SATA RAID cards.
rink [Sat, 3 Feb 2007 20:12:00 +0000 (20:12 +0000)]
Add support for the NetCell NC3000/5000 series SATA RAID cards.

Reviewed by: sos
Approved by: imp (mentor)
MFC after: 1 week

17 years agoXref altq(4).
brueffer [Sat, 3 Feb 2007 20:02:29 +0000 (20:02 +0000)]
Xref altq(4).

17 years agoXref altq(4).
brueffer [Sat, 3 Feb 2007 19:29:31 +0000 (19:29 +0000)]
Xref altq(4).

17 years agoIt turns out we were mallocing too early, so move the allocation so we
imp [Sat, 3 Feb 2007 19:11:09 +0000 (19:11 +0000)]
It turns out we were mallocing too early, so move the allocation so we
don't leak.

17 years agoFix memory leak of devinfop
imp [Sat, 3 Feb 2007 16:41:55 +0000 (16:41 +0000)]
Fix memory leak of devinfop

PR: 108719
Submitted by: Antoine Brodin

17 years agoFix possible memory leaks of devinfo.
imp [Sat, 3 Feb 2007 16:38:32 +0000 (16:38 +0000)]
Fix possible memory leaks of devinfo.

PR: 108719
Submitted by: Antoine Brodin

17 years agoFix non-use, but not memory leak, of devinfop. Set the device's
imp [Sat, 3 Feb 2007 16:33:47 +0000 (16:33 +0000)]
Fix non-use, but not memory leak, of devinfop.  Set the device's
description here.  The fix in the PR isn't necessary at all for memory
leaks, but we weren't setting the device description.

While I'm here, remove some of the obfuscating macros in attach.

PR: 108719

17 years agoFix memory leak of devinfo. The leak itself was documented in
imp [Sat, 3 Feb 2007 16:19:28 +0000 (16:19 +0000)]
Fix memory leak of devinfo.  The leak itself was documented in
PR/108719, but there's a simpler fix: free it after it is used, and
then get rid of the redundant frees this causes.  Other leaks in this
PR not yet fixed.

While I'm here, remove NetBSD/OpenBSD code and some of the portability
#defines that were getting in the way of understanding this code.  The
devinfo bug was harder to spot because one needed to know that
device_set_desc_copy() was used inside of one of them (one that didn't
take an argument!).

Prefer device_printf(sc->sc_dev, "...") to printf("%s:...",
device_get_nameunit(sc->sc_dev)).  This saves almost 300 bytes.

PR: 108719
Submitted by: Antoine Brodin

17 years agoAdd a small informative printf under bootverbose to firmware_register to
mlaier [Sat, 3 Feb 2007 16:01:46 +0000 (16:01 +0000)]
Add a small informative printf under bootverbose to firmware_register to
track problems when loading firmware from loader.

17 years agoAdd ALTQ support for aue(4).
mlaier [Sat, 3 Feb 2007 13:53:22 +0000 (13:53 +0000)]
Add ALTQ support for aue(4).

Tested by: Greg Hennessy, Volker
MFC after: 1 week

17 years agoMissed npe(4) in the last commit. "ate" also has support but is lagging a
mlaier [Sat, 3 Feb 2007 13:38:04 +0000 (13:38 +0000)]
Missed npe(4) in the last commit.  "ate" also has support but is lagging a
man page to link to.

17 years agobce(4), ipw(4), iwi(4), ral(4), udav(4), ural(4) support ALTQ as well.
mlaier [Sat, 3 Feb 2007 13:33:40 +0000 (13:33 +0000)]
bce(4), ipw(4), iwi(4), ral(4), udav(4), ural(4) support ALTQ as well.

17 years agoDo not touch the block or i-node grace times for id 0.
mpp [Sat, 3 Feb 2007 11:20:28 +0000 (11:20 +0000)]
Do not touch the block or i-node grace times for id 0.
These are used to indicate the default grace period for
the file system, and should not be touched by quotacheck.

17 years agoFix quotqcheck to correctly use the curinode count, and not the
mpp [Sat, 3 Feb 2007 11:08:48 +0000 (11:08 +0000)]
Fix quotqcheck to correctly use the curinode count, and not the
curblock count when checking if the inode soft limit has been
crossed.

17 years agong_iface requiers neighbor cache as well.
ume [Sat, 3 Feb 2007 09:34:36 +0000 (09:34 +0000)]
ng_iface requiers neighbor cache as well.

MFC after: 3 days

17 years agoStyle; remove argument names from prototype, be consistent with
bms [Sat, 3 Feb 2007 07:49:20 +0000 (07:49 +0000)]
Style; remove argument names from prototype, be consistent with
rest of file.
This has the additional side-effect of removing a C++ reserved keyword
from this file, which prevents the Click Modular Router's FreeBSD
kernel support from building.

Reviewed by: silence on -current

17 years agoether_ifattach() sets if_mtu to ETHERMTU, don't bother set it again.
kevlo [Sat, 3 Feb 2007 07:46:26 +0000 (07:46 +0000)]
ether_ifattach() sets if_mtu to ETHERMTU, don't bother set it again.

Approved by: imp, cognet

17 years agoWe need to free the ivars for the child that we just deleted.
imp [Sat, 3 Feb 2007 07:09:36 +0000 (07:09 +0000)]
We need to free the ivars for the child that we just deleted.

17 years agoIn fast forwarding path, defer processing of 169.254.0.0/16
bms [Sat, 3 Feb 2007 06:46:48 +0000 (06:46 +0000)]
In fast forwarding path, defer processing of 169.254.0.0/16
to ip_input(). See RFC 3927 section 2.7.

17 years agoThe path to the mmc/mmcbus_if.m file is wrong. Correct it by
imp [Sat, 3 Feb 2007 06:46:11 +0000 (06:46 +0000)]
The path to the mmc/mmcbus_if.m file is wrong.  Correct it by
prepending dev/

Submitted by: Andrea Bittau

17 years agoIn regular forwarding path, reject packets destined for 169.254.0.0/16
bms [Sat, 3 Feb 2007 06:45:51 +0000 (06:45 +0000)]
In regular forwarding path, reject packets destined for 169.254.0.0/16
link-local addresses. See RFC 3927 section 2.7.

17 years agoMark mmc *_if.m files as standard to allow for mmc/sd being compiled
imp [Sat, 3 Feb 2007 06:45:02 +0000 (06:45 +0000)]
Mark mmc *_if.m files as standard to allow for mmc/sd being compiled
as a module.

Submitted by: Andrea Bittau

17 years agoDiff reduction with RELENG_6, style(9):
bms [Sat, 3 Feb 2007 03:57:45 +0000 (03:57 +0000)]
Diff reduction with RELENG_6, style(9):
Remove unnecessary brace; && should be on end of line.
No functional changes.

17 years agoBackout revision 1.4; it is not verified as the correct fix for the PR.
bms [Sat, 3 Feb 2007 03:40:33 +0000 (03:40 +0000)]
Backout revision 1.4; it is not verified as the correct fix for the PR.
A more correct fix has been committed to ifconfig(8).

Submitted by: bz
PR: 102701

17 years agoAdd an EXAMPLES section to ifconfig(8), clearly showing how to configure
bms [Sat, 3 Feb 2007 03:37:37 +0000 (03:37 +0000)]
Add an EXAMPLES section to ifconfig(8), clearly showing how to configure
IPv6 addresses in FreeBSD.

See also: http://www.telscom.ch/index.php/downloads/configure_ipv6_features

MFC after: 1 week
PR: 102701
Obtained from: OpenBSD (partly, with edits)

17 years agoDrop unicast Ethernet frames not destined for the configured address
bms [Sat, 3 Feb 2007 02:57:45 +0000 (02:57 +0000)]
Drop unicast Ethernet frames not destined for the configured address
of a tap(4) instance, if IFF_PROMISC is not set.

In tap(4), we should emulate the effect IFF_PROMISC would have on
hardware, otherwise we risk introducing layer 2 loops if tap(4) is
used with bridges. This means not even bpf(4) gets to see them.

This patch has been tested in a variety of situations. Multicast and
broadcast frames are correctly allowed through. I have observed this
behaviour causing problems with multiple QEMU instances hosted on
the same FreeBSD machine.

The checks in in ether_demux() [if_ethersubr.c, rev 1.222, line 638]
are insufficient to prevent this bug from occurring, as ifp->if_vlantrunk
will always be NULL for the non-vlan case.

MFC after: 3 weeks
PR: 86429
Submitted by: Pieter de Boer (with changes)

17 years agoGrr, committed manual page without the last change - make the comment a bit
pjd [Sat, 3 Feb 2007 00:15:46 +0000 (00:15 +0000)]
Grr, committed manual page without the last change - make the comment a bit
prettier.

17 years agoAdd support for multiple exports files. This will be useful for example for
pjd [Sat, 3 Feb 2007 00:12:18 +0000 (00:12 +0000)]
Add support for multiple exports files. This will be useful for example for
ZFS, where we have automatically generated /etc/zfs/exports file, which
should not be edited directly.

Discussed with: rwatson

17 years agoUse pidfile(3) API to restart mountd(8) on success mount.
pjd [Fri, 2 Feb 2007 23:58:10 +0000 (23:58 +0000)]
Use pidfile(3) API to restart mountd(8) on success mount.
This why we won't kill random process if there is a stale PID in
/var/run/mountd.pid.

17 years agoUse int instead of u_int for the 'extra' argument to the
bms [Fri, 2 Feb 2007 22:27:45 +0000 (22:27 +0000)]
Use int instead of u_int for the 'extra' argument to the
clone_create() KPI.
This fixes a signedness bug in unit number comparisons.

Submitted by: imp, Landon Fuller
PR: kern/105228
MFC after: 2 weeks

17 years agoFor the IPv4 multicast membership socket regression test:
bms [Fri, 2 Feb 2007 21:10:37 +0000 (21:10 +0000)]
For the IPv4 multicast membership socket regression test:
 Add command line flags to increase the number of test iterations.
 Be deterministic by default, for automated operation.
 Better document assumptions.

17 years agoComply with RFC 3927, by forcing ARP replies which contain a source
bms [Fri, 2 Feb 2007 20:31:44 +0000 (20:31 +0000)]
Comply with RFC 3927, by forcing ARP replies which contain a source
address within the link-local IPv4 prefix 169.254.0.0/16, to be
broadcast at link layer.

Reviewed by: fenner
MFC after: 2 weeks

17 years ago- Teach pciconf(8) to list the PCI capabilities supported by each device
jhb [Fri, 2 Feb 2007 19:54:17 +0000 (19:54 +0000)]
- Teach pciconf(8) to list the PCI capabilities supported by each device
  via a new -c flag to be used with -l.  Some simple parsing code is
  present for the following capabilities: Power Management, AGP, VPD,
  MSI, PCI-X, HyperTransport, Vendor-specific, EHCI Debug Port, PCI-PCI
  bridge subvendor ID, PCI-express, and MSI-X.
- Fix a few warnings in pciconf.c.
- Update some cruft in pciconf(8):
  - PCI 2.1 is no longer a revolutionary standard, and subvendor ID's are
    fairly common at this point, so reflect that.
  - Header type 2 is used for PCI-CardBus bridges.
  - Describe the -v option for -l after completing the basic -l description
    instead of disrupting the flow in the middle.

Reviewed by: imp (partially)
MFC after: 1 week

17 years agoAdd constants for the PCIY_VENDOR (vendor-specific), PCIY_DEBUG (EHCI
jhb [Fri, 2 Feb 2007 19:48:25 +0000 (19:48 +0000)]
Add constants for the PCIY_VENDOR (vendor-specific), PCIY_DEBUG (EHCI
debug port), and PCIY_EXPRESS (PCI-express) capabilities.

17 years agoExpose smoothed RTT and RTT variance measurements to userland via
bms [Fri, 2 Feb 2007 18:34:18 +0000 (18:34 +0000)]
Expose smoothed RTT and RTT variance measurements to userland via
socket option TCP_INFO.
Note that the units used in the original Linux API are in microseconds,
so use a 64-bit mantissa to convert FreeBSD's internal measurements
from struct tcpcb from ticks.

17 years agoProperly parenthesize the __tg_is_complex() macro by moving a closing
schweikh [Fri, 2 Feb 2007 18:30:23 +0000 (18:30 +0000)]
Properly parenthesize the __tg_is_complex() macro by moving a closing
paren to where it belongs.

MFC after: 7 days

17 years agoComment the token after #endif, like we do everywhere else.
schweikh [Fri, 2 Feb 2007 18:11:18 +0000 (18:11 +0000)]
Comment the token after #endif, like we do everywhere else.
Static analyzers like FlexeLint complain about it.

MFC after: 7 days

17 years agoBased on input from ru & rodrigc document the mount operation in the new
ambrisko [Fri, 2 Feb 2007 16:26:15 +0000 (16:26 +0000)]
Based on input from ru & rodrigc document the mount operation in the new
world order:
mount -t linsysfs linsys /compat/linux/sys
instead of mount_linsysfs.  Now that 6.X requires mount_linsysfs to
work.  This is why there is a mount_linsysfs in 6.X and not in -current.

Prompted by: ru
Reviewed by: ru, rodrigc

17 years agocoda_vptofh is never defined nor used.
pjd [Fri, 2 Feb 2007 15:47:28 +0000 (15:47 +0000)]
coda_vptofh is never defined nor used.

17 years agoRemove dead email address.
joel [Fri, 2 Feb 2007 13:44:09 +0000 (13:44 +0000)]
Remove dead email address.

Requested by: luigi

17 years agoClean up the BSD license to match the preferred license in
joel [Fri, 2 Feb 2007 13:39:20 +0000 (13:39 +0000)]
Clean up the BSD license to match the preferred license in
/usr/share/examples/etc/bsd-style-copyright.  I've fixed a
few minor wording and formatting differences.

Approved by: luigi, Hannu Savolainen <hannu@opensound.com>