Commit Graph

149712 Commits

Author SHA1 Message Date
Pawel Jakub Dawidek
7dae3c4faf Be sure not to overflow struct fid.
MFC after:	3 days
2009-09-13 10:25:33 +00:00
Pawel Jakub Dawidek
f53901193d There is a bug where mze_insert() can trigger an assert() of inserting
the same entry twice. This bug is not fixed yet, but leads to situation
where when try to access corrupted directory the kernel will panic.
Until the bug is properly fixed, try to recover from it and log that it
happened.

Reported by:	marck
OpenSolaris bug:	6709336
MFC after:	3 days
2009-09-13 10:12:29 +00:00
Bruce M Simpson
6cbbe26f98 In expire_mfc(), add an assert on the multicast forwarding cache mutex.
PR:		138666
2009-09-13 01:00:24 +00:00
Hiroki Sato
66ed47241a Add missing comments and whitespace clean-ups. 2009-09-12 23:01:36 +00:00
Hiroki Sato
084a977959 Use is_wired_interface() instead of hard-coded interface device
names.

Pointed out by:	sam
2009-09-12 23:00:01 +00:00
Hiroki Sato
00303aec4d The following changes are added because of
network_ipv6->rc.d/netif integration:

- $ipv6_enable is now obsolete.  Instead, IPv6 is enabled by
  default if the kernel supports it, and $ipv6_network_interfaces
  is "none" by default.  If you want to use IPv6, define
  $ipv6_network_interfaces and $ifconfig_xxx_ipv6.

  An interface which is in $network_interfaces and not in
  $ipv6_network_interfaces will be marked as "inet6
  -auto_linklocal ifdisabled" (see ifconfig(8)).

- $ipv6_ifconfig_xxx is renamed to ifconfig_xxx_ipv6 for
  consistency with other address families.  The old variables
  still work but can be removed in the future.  Note that
  ipv6_ifconfig_xxx="..." should be replaced with
  ifconfig_xxx_ipv6="inet6 ...".

- Receiving ICMPv6 Router Advertisement is not automatically
  enabled even if there is no manual configuration of IPv6 in
  rc.conf.  If you want it, define
  ifconfig_xxx_ipv6="inet6 ... accept_rtadv".

- The rc.d/ip6addrctl now chooses address selection policy based
  on $ipv6_prefer, not $ipv6_enable.  The default is
  ipv6_prefer=NO.

- $router* and $ipv6_router* are replaced with $routed_* and
  $route6d_* for consistency.  The old variables still work but
  can be removed in the future.

MFC after:	3 days
2009-09-12 22:22:31 +00:00
Hiroki Sato
b528b5502b Add an extension of set_rcvar(), a new function set_rcvar_obsolete(),
and $desc.

The set_rcvar_obsolete() is for displaying an obsolete variable
and the new one.  More specifically, a warning is displayed when
a variable is removed or changed in the source tree and the user
still defines the old one.

$router* and $ipv6_router* are replaced with $routed_* and
$route6d_* for consistency.  The old variables still work but
can be removed in the future.

MFC after:	3 days
2009-09-12 22:19:48 +00:00
Hiroki Sato
40e0d27fc1 Use RCng coding convention.
MFC after:	3 days
2009-09-12 22:17:52 +00:00
Hiroki Sato
6dcd0ad85d Document accept_rev_ethip_ver and send_rev_ethip_ver flags of
EtherIP (gif(4) + if_bridge(8)).

MFC after:	3 days
2009-09-12 22:17:13 +00:00
Hiroki Sato
eb87e699b2 Add support for ND6_IFF_IFDISABLED and ND6_IFF_ACCEPT_RTADV to
the -F flag.

MFC after:	3 days
2009-09-12 22:14:58 +00:00
Hiroki Sato
70a873df0f - Add "AUTO" keyword support in $rtadvd_interfaces.
- Wrap a long line.

MFC after:	3 days
2009-09-12 22:14:21 +00:00
Hiroki Sato
5d595cb88e Integrate rc.d/network_ipv6 into rc.d/netif:
- Add rc.d/stf and rc.d/faith for stf(4) and faith(4).
- Remove rc.d/auto_linklocal and rc.d/network_ipv6.
- Move rc.d/sysctl to just before FILESYSTEMS because rc.d/netif
  depends on some sysctl variables.

Reviewed by:	brooks
MFC after:	3 days
2009-09-12 22:13:41 +00:00
Hiroki Sato
a283298ce3 Improve flexibility of receiving Router Advertisement and
automatic link-local address configuration:

- Convert a sysctl net.inet6.ip6.accept_rtadv to one for the
  default value of a per-IF flag ND6_IFF_ACCEPT_RTADV, not a
  global knob.  The default value of the sysctl is 0.

- Add a new per-IF flag ND6_IFF_AUTO_LINKLOCAL and convert a
  sysctl net.inet6.ip6.auto_linklocal to one for its default
  value.  The default value of the sysctl is 1.

- Make ND6_IFF_IFDISABLED more robust.  It can be used to disable
  IPv6 functionality of an interface now.

- Receiving RA is allowed if ip6_forwarding==0 *and*
  ND6_IFF_ACCEPT_RTADV is set on that interface.  The former
  condition will be revisited later to support a "host + router" box
  like IPv6 CPE router.  The current behavior is compatible with
  the older releases of FreeBSD.

- The ifconfig(8) now supports these ND6 flags as well as "nud",
  "prefer_source", and "disabled" in ndp(8).  The ndp(8) now
  supports "auto_linklocal".

Discussed with:	bz and jinmei
Reviewed by:	bz
MFC after:	3 days
2009-09-12 22:08:20 +00:00
Luigi Rizzo
446e861708 Make sure callouts are not processed one tick late.
The problem was introduced in SVN 180608/ rev 1.114 and affects
all users of callout_reset() (including select, usleep, setitimer).
A better fix probably involves replicating 'ticks' in the
struct callout_cpu; this commit is just a temporary thing so that
we can MFC it after a suitable test time and RE approval.

MFC after:	3 days
2009-09-12 21:44:34 +00:00
Bruce M Simpson
fa2eebfce6 Comment some flawed assumptions in inp_join_group() about
mixing SSM full-state and delta-based APIs.

ENOTIME to fix right now.  No functional changes.

MFC after:	5 days
2009-09-12 20:37:44 +00:00
Bruce M Simpson
0eebc0d7b4 Don't allow joins w/o source on an existing group.
This is almost always pilot error.

We don't need to check for group filter UNDEFINED state at t1,
because we only ever allocate filters with their groups, so we
unconditionally reject such calls with EINVAL.
Trying to change the active filter mode w/o going through IP_MSFILTER
is also disallowed.

Deals with the case described in PR 137164 upfront, cumulative
with the fix in svn rev 197132 which only calls imo_match_source()
if the source address family was not unspecified.

PR:		137164
MFC after:	5 days
2009-09-12 20:18:23 +00:00
Robert Watson
e76d823b81 Use C99 initialization for struct filterops.
Obtained from:	Mac OS X
Sponsored by:	Apple Inc.
MFC after:	3 weeks
2009-09-12 20:03:45 +00:00
Pawel Jakub Dawidek
f5516e3d1d - Protect reclaim with z_teardown_inactive_lock.
- Be prepared for dbuf to disappear in zfs_reclaim_complete() and check if
  z_dbuf field is NULL - this might happen in case of rollback or forced
  unmount between zfs_freebsd_reclaim() and zfs_reclaim_complete().
- On forced unmount wait for all znodes to be destroyed - destruction can be
  done asynchronously via zfs_reclaim_complete().

MFC after:	1 week
2009-09-12 19:53:31 +00:00
Bruce M Simpson
1fc39d5424 Tighten input checking in inp_join_group():
* Don't try to use the source address, when its family is unspecified.
 * If we get a join without a source, on an existing inclusive
   mode group, this is an error, as it would change the filter mode.

Fix a problem with the handling of in_mfilter for new memberships:
 * Do not rely on imf being NULL; it is explicitly initialized to a
   non-NULL pointer when constructing a membership.
 * Explicitly initialize *imf to EX mode when the source address
   is unspecified.

This fixes a problem with in_mfilter slot recycling in the join path.

PR:		138690
Submitted by:	Stef Walter
MFC after:	5 days
2009-09-12 19:45:55 +00:00
Pawel Jakub Dawidek
2a8e7dad33 Tighten up the check for race in zfs_zget() - ZTOV(zp) can not only contain
NULL, but also can point to dead vnode, take that into account.

PR:		kern/132068
Reported by:	Edward Fisk" <7ogcg7g02@sneakemail.com>, kris
Fix based on patch from:	Jaakko Heinonen <jh@saunalahti.fi>
MFC after:	1 week
2009-09-12 19:27:54 +00:00
Bruce M Simpson
cc5776b24d Fix an obvious logic error in the IPv4 multicast leave processing,
where the filter mode vector was not updated correctly after the leave.

PR:		138691
Submitted by:	Stef Walter
MFC after:	5 days
2009-09-12 19:07:03 +00:00
Bruce M Simpson
67e89408e5 Fix an API issue in leave processing for IPv4 multicast groups.
* Do not assume that the group lookup performed by imo_match_group()
   is valid when ifp is NULL in this case.
 * Instead, return EADDRNOTAVAIL if the ifp cannot be resolved for the
   membership we are being asked to leave.

Caveat user:
 * The way IPv4 multicast memberships are implemented in the inpcb layer
   at the moment, has the side-effect that struct ip_moptions will
   still hold the membership, under the old ifp, until ip_freemoptions()
   is called for the parent inpcb.
 * The underlying issue is: the inpcb layer does not get notification
   of ifp being detached going away in a thread-safe manner.
   This is non-trivial to fix.

But hey, at least the kernel should't panic when you unplug a card.

PR:		138689
Submitted by:	Stef Walter
MFC after:	5 days
2009-09-12 18:55:15 +00:00
Andriy Gapon
b6e33c9dd0 intpm: add support for smbus controller found in AMD SB700
According to the specifications AMD/ATI SMBus controller is very
similar to SMBus controller found in PIIX4.
Some notable differences:
 o different bit for enabling/signalling regular interrupt mode
 o in practice seems to support only polling mode
Thus, intpm driver is modified to support polling-only mode
and to recognize SB700 PCI ID and differences.

Tested on:	SB700 and PIIX4E platforms
Reviewed by:	jhb
MFC after:	2 weeks
X-Perhaps-ToDo:	rename the driver to reflect its function
		and supported hardware
2009-09-12 18:24:31 +00:00
Luigi Rizzo
34d1dd53a4 ifconfig now needs -ljail
(this needs to go to RELENG_8 as well after the release is out)

MFC after:	1 month
2009-09-12 15:50:08 +00:00
Ed Schouten
87da28e914 Commit a change that I missed in the previous commit.
I ran `svn commit' in sys/teken/, instead of sys/.
2009-09-12 14:46:22 +00:00
Ed Schouten
eba77f5c40 Commit all local modifications I have to libteken:
- Make xterm/cons25 support runtime configurable. This allows me to
  share libteken between syscons and my new vt driver.
- Add a fix to print blanks after printing a double width character to
  prevent rendering artifacts.
- Add some more utility functions that I use in the vt driver.
2009-09-12 12:44:21 +00:00
Ed Schouten
5e666eb395 Small style(9) bug introduced in the previous commit. 2009-09-12 10:41:32 +00:00
Ed Schouten
e06d84fc49 Make 8-bit support run-time configurable.
Now to do the same for xterm support. This means people can eventually
toy around with xterm+UTF-8 without recompiling their kernel.
2009-09-12 10:34:34 +00:00
Ed Schouten
b03552b5e2 Make resizing of teken terminals a bit more safe.
Just perform a full reset when resizing the terminal. This means the
cursor, scrolling region, etc. are never positioned outside the
terminal.
2009-09-12 08:19:24 +00:00
Dag-Erling Smørgrav
7b2924cb17 Fix typo in example.
Noticed by:	rookie@
MFC after:	1 week
2009-09-12 01:37:22 +00:00
Xin LI
f4959cc052 Mention that individual device driver can accept other flags through
resource_int_value(9).

MFC after:	1 month
2009-09-12 00:28:05 +00:00
Xin LI
7ec7f6d5ed Make use of the more flexable device hints by adding a new field,
vesa_mode to specify VESA mode, as suggested by jhb@.
2009-09-12 00:12:47 +00:00
Kip Macy
7d05808361 fix UP compilation 2009-09-11 23:41:11 +00:00
Jung-uk Kim
ca8a21efc8 Canonify include paths for newly added files. 2009-09-11 22:56:08 +00:00
Jung-uk Kim
bdc794c4f9 Catch up with ACPICA 20090903. 2009-09-11 22:50:15 +00:00
Jung-uk Kim
92488a5703 Catch up with ACPICA 20090903. 2009-09-11 22:49:34 +00:00
Jung-uk Kim
d6dd1baec0 MFV: r196804
Import ACPICA 20090903
2009-09-11 22:48:53 +00:00
Jung-uk Kim
7ca2d97bbd Fix typos in comments from the previous commit. 2009-09-11 22:05:59 +00:00
Jung-uk Kim
a4165bba6f Improve amdtemp(4) significantly:
- Improve newer AMD processor support (Family 0Fh Revision F and later).
- Adjust offset if DiodeOffet is set and valid.  Note it is experimental
but it seems to give us more realistic temperatures.  Newer Linux driver
blindly adds 21C for Family 0Fh desktop processors, however.
- Always populate dev.cpu and dev.amdtemp sysctl trees regardless of probe
order for consistency.  Previously, dev.cpu.N.temperature was not populated
if amdtemp was loaded later than ACPI CPU driver and temperatures were not
accessible from dev.amdtemp.N.sensor0 tree for Family 10h/11h processors.
- Read the CPUID from PCI register instead of CPUID instruction to prevent
possible revision mismatches on multi-socket system.
- Change macros and variables to make them closer to AMD documents.
- Fix style(9) nits and improve comments.
2009-09-11 21:47:44 +00:00
Andriy Gapon
d16d35fd54 pci(4): don't perform maximum register number check
Different sub-kinds of PCI buses may have different rules and
thus it is up for the bus backends to do proper input checks.
For example, PCIe allows configuration register numbers < 0x1000,
while for PCI proper the limit is 0x100.
And, in fact, the buses already do the checks.

Reviewed by:	jhb
MFC after:	1 week
X-ToDo:		add check for negative value to bus backends
X-ToDo:		use named constant for maximum PCIe register
2009-09-11 18:48:49 +00:00
Alexander Motin
3fc0b61c51 Add simple embedded RADIUS server support to libradius, by extending existing
API, keeping backward compatibility.

First consumer for this functionality is going to become forthcoming MPD-5.4,
supporting CoA and DR of RFC 3576: Dynamic Authorization Extensions to RADIUS.

MFC after:	1 month
2009-09-11 11:42:56 +00:00
Xin LI
493d6f54bc Extend the usage of sc(4)'s hint variable 'flag'. Bit 0x80 now means
"set vesa mode" and higher 16bits of the flag would be the desired mode.

One can now set, for instance, hint.sc.0.flags=0x01680180, which means
that the system should set VESA mode 0x168 upon boot.

Submitted by:	paradox <ddkprog yahoo com>, swell k at gmail.com with
		some minor changes.
2009-09-11 02:07:24 +00:00
Jack F Vogel
ac54649762 Stats missed packet handling was still not quite
right, thanks to Dmitrij Tejblum for the correction,
need a variable with scope only within the for loop
for all queues.

MFC: 3 days
2009-09-11 00:00:23 +00:00
Maksim Yevmenkin
06acf4bc6f Get those pesky RFCOMM RPM data bits right. This is likely a noop.
MFC after:	1 month
2009-09-10 23:30:13 +00:00
Ed Maste
58564ca597 If the pxe client is told to use / as the root path, honour that rather
of trying to mount /pxeroot instead.

PR:		i386/106493
Submitted by:	Andrey Russev
MFC after:	1 month
2009-09-10 22:05:43 +00:00
Xin LI
b8e83993c5 Add entries for moved files during vesa/dpms promotion. 2009-09-10 21:42:00 +00:00
Nathan Whitehorn
3d59b758d0 Add a few SCSI controllers to GENERIC that can be found on Powermacs.
This allows installation onto SCSI disks as shipped, for example,
with the Powermac G3.

PR:		powerpc/138543
Obtained from:	sparc64
MFC after:	3 days
2009-09-10 21:25:05 +00:00
Jack F Vogel
7d21b9c117 Fix build issue with last commit. 2009-09-10 21:16:26 +00:00
Jack F Vogel
b53aa98e18 Fix build complaint from previous checkin 2009-09-10 21:14:55 +00:00
Andriy Gapon
f778af723b pci: remove definitions of duplicate constants
Suggested by:	jhb
Reviewed by:	jhb
MFC after:	1 week
2009-09-10 19:27:53 +00:00