]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/log
FreeBSD/stable/9.git
10 years agoMFC r253818:
smh [Fri, 2 Aug 2013 23:31:28 +0000 (23:31 +0000)]
MFC r253818:

Fix zfs send -D hang after processing requiring a CTRL+C to interrupt due to
pthread_join prior to fd close.

Approved by: re (delphij)

git-svn-id: svn://svn.freebsd.org/base/stable/9@253901 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r253810
ache [Fri, 2 Aug 2013 17:13:29 +0000 (17:13 +0000)]
MFC r253810

grep -i does not work for simple patterns and single byte locales, like
LANG=ru_RU.KOI8-R grep -i <some single KOI8-R letter>
Fix it.

Approved by:    re (delphij,kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@253888 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC 253751 and 253843:
hrs [Fri, 2 Aug 2013 03:46:45 +0000 (03:46 +0000)]
MFC 253751 and 253843:

- Relax the restriction on the member interfaces with LLAs.  Two or more
  LLAs on the member interfaces are actually harmless when the parent
  interface does not have a LLA.

- Add net.link.bridge.allow_llz_overlap.  This is a knob to allow LLAs on
  a bridge and the member interfaces at the same time.  The default is 0.

Approved by: re (marius)

git-svn-id: svn://svn.freebsd.org/base/stable/9@253878 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: r249410 (partial)
marius [Thu, 1 Aug 2013 13:18:47 +0000 (13:18 +0000)]
MFC: r249410 (partial)

Remove ctl(4) from GENERIC.

With ctl(4) being built as a module and automatically loaded by ctladm(8),
this makes CTL work out of the box.

Note that unlike the original r249410, this commit does not remove the
kern.cam.ctl.disable tunable for POLA reasons.

PR: 174671, 175694, 179112
Reviewed by: ken (original version)
Sponsored by: FreeBSD Foundation (original version)
Approved by: re (hrs)

git-svn-id: svn://svn.freebsd.org/base/stable/9@253860 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r253754:
mav [Thu, 1 Aug 2013 09:42:17 +0000 (09:42 +0000)]
MFC r253754:
Partially close race between calls of orphan() method from GEOM and close()
method from ZFS core, that reliably causes use-after-free panic if SSD vdev
detached during inititial erase.

Approved by: re (delphij)

git-svn-id: svn://svn.freebsd.org/base/stable/9@253855 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoRevert r249530 and re-enable compilation of ctl.ko for all configurations
marius [Wed, 31 Jul 2013 11:36:20 +0000 (11:36 +0000)]
Revert r249530 and re-enable compilation of ctl.ko for all configurations
except i386 XEN, for which it still doesn't build so far.
This is a direct commit to stable/9.

Approved by: re (delphij, kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@253836 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r249328:
trasz [Wed, 31 Jul 2013 10:54:24 +0000 (10:54 +0000)]
MFC r249328:

Make ctladm(8) try to load ctl.ko kernel module if needed.

Approved by: re (delphij)

git-svn-id: svn://svn.freebsd.org/base/stable/9@253835 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: r238896, r238897, r241331 (usr.bin/script/ only), r241972, r242138,
obrien [Tue, 30 Jul 2013 19:24:05 +0000 (19:24 +0000)]
MFC: r238896, r238897, r241331 (usr.bin/script/ only), r241972, r242138,
     r248388, 253814

+ Add "-f" to also output filemon(4) information.
+ Add d, p and r switches for recording script sessions with timing data
  and playing sessions back with or without time delays.
+ Remove contractions.

Approved by: releng (glebius)

git-svn-id: svn://svn.freebsd.org/base/stable/9@253815 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r253554:
jlh [Tue, 30 Jul 2013 12:17:45 +0000 (12:17 +0000)]
MFC r253554:
  Fix a panic in the racct code when munlock(2) is called with incorrect values.

  The racct code in sys_munlock() assumed that the boundaries provided by
  the userland were correct as long as vm_map_unwire() returned
  successfully.  However the latter contains its own logic and sometimes
  manages to do something out of those boundaries, even if they are buggy.
  This change makes the racct code to use the accounting done by the vm
  layer, as it is done in other places such as vm_mlock().

  Despite fixing the panic, Alan Cox pointed that this code is still
  race-y though: two simultaneous callers will produce incorrect values.

  Reviewed by:  alc

MFC r253556:
  Fix previous commit when option RACCT is not used.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@253801 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: 253676
marius [Tue, 30 Jul 2013 10:37:11 +0000 (10:37 +0000)]
MFC: 253676

- Once we have shifted arguments thrice, base-bits-dir is $1 rather than $4.
  Introduce $BASEBITSDIR for clarity and in order to avoid repeating this
  mistake in the future. Fixing this ensures that we pick up the newly built
  boot code and loader native to the target, which is especially relevant
  when cross-building release images.
- It is pointless to specify an endianess for ISO 9660 images so strip that.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@253799 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: r253675
marius [Tue, 30 Jul 2013 10:24:09 +0000 (10:24 +0000)]
MFC: r253675

Ensure that makefs.h is included when using ufs_bswap.h so the FFS_EI macro
is picked up when defined. Previously, ffs_subr.c was always built without
support for opposite endianess as it doesn't include makefs.h on its own.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@253798 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: r253707
marius [Tue, 30 Jul 2013 10:22:08 +0000 (10:22 +0000)]
MFC: r253707

- Set the System Identifier in the Primary Volume Descriptor to FreeBSD
  rather than NetBSD.
- Correctly set the Expiration Time in the Primary Volume Descriptor;
  according to ISO 9660 8.4.26.1 unspecified date and time are denoted
  by the digit 0 in RBP 1 to 16 but the number 0 in RBP 17. [1]
- Merge iso9660_rrip.c rev. 1.11 from NetBSD: name_len should be read
  as unsigned byte. [2]
  Note: This is according to ISO 9660 9.1.10.
- Rock Ridge TF entries should use a length of 5, because after the 4
  bytes of generic SUSP header there is one byte of flags. See typedef
  of ISO_RRIP_TF in iso9660_rrip.h. [1]

Submitted by: Thomas Schmitt [1]
Approved by: re (kib)
Obtained from: NetBSD [2]

git-svn-id: svn://svn.freebsd.org/base/stable/9@253797 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r253407:
np [Mon, 29 Jul 2013 19:21:54 +0000 (19:21 +0000)]
MFC r253407:
Specify a timeout for the PL block.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@253777 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r253217,253699
np [Mon, 29 Jul 2013 19:17:11 +0000 (19:17 +0000)]
MFC r253217,253699

r253217:
Attach to the 4x10G T540-CR card.

r253699:
Expand the list of devices claimed by cxgbe(4).

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@253776 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoApproved by: re (hrs, marius)
rodrigc [Sat, 27 Jul 2013 05:32:26 +0000 (05:32 +0000)]
Approved by: re (hrs, marius)

MFC 253346:

    PR: 168520 170096
    Submitted by: adrian, zec

    Fix multiple kernel panics when VIMAGE is enabled in the kernel.
    These fixes are based on patches submitted by Adrian Chadd and Marko Zec.

    (1)  Set curthread->td_vnet to vnet0 in device_probe_and_attach() just before calling
     device_attach().  This fixes multiple VIMAGE related kernel panics
     when trying to attach Bluetooth or USB Ethernet devices because
     curthread->td_vnet is NULL.

    (2)  Set curthread->td_vnet in if_detach().  This fixes kernel panics when detaching networking
         interfaces, especially USB Ethernet devices.

    (3)  Use VNET_DOMAIN_SET() in ng_btsocket.c

    (4)  In ng_unref_node() set curthread->td_vnet.  This fixes kernel panics
         when detaching Netgraph nodes.

git-svn-id: svn://svn.freebsd.org/base/stable/9@253700 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoUpdate stable/9 branch to -BETA2 status.
gjb [Fri, 26 Jul 2013 23:41:22 +0000 (23:41 +0000)]
Update stable/9 branch to -BETA2 status.

Approved by: re (implicit)
Approved by: kib (mentor, implicit)

git-svn-id: svn://svn.freebsd.org/base/stable/9@253698 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoFix Denial of Service vulnerability in named(8). [13:07]
delphij [Fri, 26 Jul 2013 22:43:09 +0000 (22:43 +0000)]
Fix Denial of Service vulnerability in named(8). [13:07]

Security: CVE-2013-4854
Security: FreeBSD-SA-13:07.bind
Approved by: re (rodrigc)

git-svn-id: svn://svn.freebsd.org/base/stable/9@253695 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC 253262, 253318, 243184, 253444, 253505, 253520:
hrs [Fri, 26 Jul 2013 18:27:13 +0000 (18:27 +0000)]
MFC 253262, 253318, 243184, 253444, 253505, 253520:

- Add a leaf node CTL_NET.PF_ROUTE.0.AF.NET_RT_DUMP.0.FIB.  This returns
  routing table with the specified FIB number, not td->td_proc->p_fibnum.

- Add check_namevarlist() to check if ${name}_var is reserved in
  rc.subr or not.

- Fix a bug in ipv6_prefix_IF.  It did not work with the 64-bit prefix
  notation like 2001:db8:1:1.

- Use eui64 flag in ifconfig(8) instead of network6_getladdr()[*] for
  interface indentifier part.

- Fix address range specification with ifconfig(8) options such as:

  * inet 192.0.2.1-10 netmask 255.255.255.0 (inet range spec + ifconfig options)
  * inet6 2001:db8:1::1-f prefixlen 60 (inet6 range spec + ifconfig options)

  If prefixlen or netmask option is specified with CIDR notation at
  the same time, the option is used.

-  Do not set ND6_IFF_ACCEPT_RTADV on if_bridge(4) interfaces when
   ipv6_enable=yes.

Approved by: re (marius)

git-svn-id: svn://svn.freebsd.org/base/stable/9@253683 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r253532:
hselasky [Fri, 26 Jul 2013 06:24:33 +0000 (06:24 +0000)]
MFC r253532:

Fix an XHCI regression:

The Block Event Interrupts, BEI, feature does not
work like expected with the Renesas XHCI chipsets.
Revert feature.

While at it correct the TD SIZE computation in
case of Zero Length Packet, ZLP, in the end of a
multi frame USB transfer.

PR:             usb/180726
Approved by:    re, hrs

git-svn-id: svn://svn.freebsd.org/base/stable/9@253665 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r253404:
yongari [Fri, 26 Jul 2013 06:23:06 +0000 (06:23 +0000)]
MFC r253404:
   o TxD ring requires 8 bytes alignment to work so change alignment
     constraint to 8. Previously it may have triggered watchdog
     timeouts.
   o Check whether interrupt is ours or not.
   o Enable interrupts before attemping to transmit queued packets.
     This will slightly improve TX performance.
   o No need to clear IFF_DRV_OACTIVE in a loop. AE_FLAG_TXAVAIL is
     used to know whether there are enough available TxD ring space.
   o Added missing bus_dmamap_sync(9) in ae_rx_intr() and rearranged
     code to avoid unncessary register access.
   o Make sure to clear TxD, TxS, RxD rings in driver initialization.
     Otherwise some data in these rings could be interpreted as
     'updated' which in turn will advance internally maintained
     pointers and can trigger watchdog timeouts.

  PR: kern/180382
  Approved by: re (hrs)

git-svn-id: svn://svn.freebsd.org/base/stable/9@253663 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoprotect acpi_battery_ioctl with Giant
avg [Thu, 25 Jul 2013 08:05:25 +0000 (08:05 +0000)]
protect acpi_battery_ioctl with Giant

This is a direct commit to stable/9.

There is a bug in the ACPICA version 20110527 that is used in stable/9.
The bug can lead to unprotected reference counting on ACPI objects
and eventually to a crash or a memory corruption.  The bug has been fixed
upstream and imported to head as of ACPICA version 20130328.
Unfortunately, ACPICA version in stable has not been updated,
so merging all past ACPICA versions or cherry-picking parts of 20130328
would be a big change with a risk of potential regressions.

During debugging it was determined that the most probable vector for the
bug was through concurrent calls to ACPI battery sysctls and ioctls.
The sysctls are already guarded by Giant (not MPSAFE), but ioctls could
execute in parallel to a sysctl call and to each other. All the calls
go through acpi_battery_ioctl function, which makes the actual calls
into ACPICA and those are the calls that lack necessary protection.
Thus preventing concurrency in acpi_battery_ioctl should prevent the
conditions that triggered the ACPICA bug.

Some additional details can be found in this thread:
http://thread.gmane.org/gmane.os.freebsd.devel.acpi/7707/focus=7774

Tested by: kron24@gmail.com,
David Demelier <demelier.david@gmail.com>
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@253642 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r253541:
cperciva [Thu, 25 Jul 2013 02:48:01 +0000 (02:48 +0000)]
MFC r253541:
  Remove weirdly-named autofoo file.  This is not needed for the (FreeBSD)
  build, and freebsd-update chokes on it.

Approved by: re (delphij)

git-svn-id: svn://svn.freebsd.org/base/stable/9@253633 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r253513, r253542:
gjb [Thu, 25 Jul 2013 02:43:05 +0000 (02:43 +0000)]
MFC r253513, r253542:

r253513:
 Create memstick images with the '.img' filename extension.

r253542:
 For consistency with previous releases, name the cdrom install
 cd 'disc1.iso'.

Approved by: kib (mentor)
Approved by: re (marius)

git-svn-id: svn://svn.freebsd.org/base/stable/9@253632 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r253476:
jimharris [Wed, 24 Jul 2013 22:48:29 +0000 (22:48 +0000)]
MFC r253476:

  Add message when nvd disks are attached and detached.

  As part of this commit, add an nvme_strvis() function which borrows
  heavily from cam_strvis().  This will allow stripping of
  leading/trailing whitespace and also handle unprintable characters
  in model/serial numbers.  This function goes into a new nvme_util.c
  file which is used by both the driver and nvmecontrol.

Approved by: re (kib)
Sponsored by: Intel

git-svn-id: svn://svn.freebsd.org/base/stable/9@253631 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r253474:
jimharris [Wed, 24 Jul 2013 22:46:27 +0000 (22:46 +0000)]
MFC r253474:

  Fix nvme(4) and nvd(4) to support non 512-byte sector sizes.

  Recent testing with QEMU that has variable sector size support for
  NVMe uncovered some of these issues.  Chatham prototype boards supported
  only 512 byte sectors.

Approved by: re (kib)
Sponsored by: Intel

git-svn-id: svn://svn.freebsd.org/base/stable/9@253630 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r253473:
jimharris [Wed, 24 Jul 2013 22:44:46 +0000 (22:44 +0000)]
MFC r253473:

  Do not call disk_create() until we have completed all initialization of our
  internal disk structure.

Approved by: re (kib)
Sponsored by: Intel

git-svn-id: svn://svn.freebsd.org/base/stable/9@253629 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r253459:
jimharris [Wed, 24 Jul 2013 22:43:40 +0000 (22:43 +0000)]
MFC r253459:

  Use _PATH_DEV (from paths.h) for the "/dev/" string, rather than
  hard-coding it.

Approved by: re (kib)
Sponsored by: Intel

git-svn-id: svn://svn.freebsd.org/base/stable/9@253628 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r253438:
jimharris [Wed, 24 Jul 2013 22:42:00 +0000 (22:42 +0000)]
MFC r253438:

  Use pause() instead of DELAY() when polling for completion of admin
  commands during controller initialization.

  DELAY() does not work here during config_intrhook context - we need to
  explicitly relinquish the CPU for the admin command completion to
  get processed.

Approved by: re (kib)
Sponsored by: Intel

git-svn-id: svn://svn.freebsd.org/base/stable/9@253627 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r253437:
jimharris [Wed, 24 Jul 2013 22:40:34 +0000 (22:40 +0000)]
MFC r253437:

  Define constants for the lengths of the serial number, model number
  and firmware revision in the controller's identify structure.

  Also modify consumers of these fields to ensure they only use the
  specified number of bytes for their respective fields.

Approved by: re (kib)
Sponsored by: Intel

git-svn-id: svn://svn.freebsd.org/base/stable/9@253626 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r253436, r253458:
jimharris [Wed, 24 Jul 2013 22:38:37 +0000 (22:38 +0000)]
MFC r253436, r253458:

  Simplify open_dev() by returning errno values rather than just 0 or 1.

  Also remove stat() call and just rely on errno from open() call to discern
  whether dev node exists or not.

Approved by: re (kib)
Sponsored by: Intel

git-svn-id: svn://svn.freebsd.org/base/stable/9@253625 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r253393:
jimharris [Wed, 24 Jul 2013 22:34:06 +0000 (22:34 +0000)]
MFC r253393:

  Do not throw an error if the user requests to activate the image from
  an empty firmware slot, as long as the user has specified a firmware
  image to download into the empty firmware slot.

Approved by: re (kib)
Sponsored by: Intel

git-svn-id: svn://svn.freebsd.org/base/stable/9@253624 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: r253455
jkim [Wed, 24 Jul 2013 22:26:11 +0000 (22:26 +0000)]
MFC: r253455

Decode PCIe ASPM capability and status.

Approved by: re (delphij)

git-svn-id: svn://svn.freebsd.org/base/stable/9@253622 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: r253439
jkim [Wed, 24 Jul 2013 21:53:33 +0000 (21:53 +0000)]
MFC: r253439

Reload font when syscons(4) is resuming without switching mode.

Approved by: re (delphij)

git-svn-id: svn://svn.freebsd.org/base/stable/9@253621 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoModernize the package list for 9.2-RELEASE cycle:
gjb [Wed, 24 Jul 2013 13:43:09 +0000 (13:43 +0000)]
Modernize the package list for 9.2-RELEASE cycle:

 o Update the perl package version to 5.14.

 o Add devel/subversion and devel/subversion-static so we provide
   a package for source-based users to check out the various trees,
   both with and without extra dependencies.

This is a direct commit to stable/9.

Approved by: kib (mentor)
Approved by: re (glebius)

git-svn-id: svn://svn.freebsd.org/base/stable/9@253613 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r253380,253413: name passed into __setenv is not necessarily NUL-terminated
avg [Wed, 24 Jul 2013 13:07:29 +0000 (13:07 +0000)]
MFC r253380,253413: name passed into __setenv is not necessarily NUL-terminated

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@253610 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: r253506
rmacklem [Wed, 24 Jul 2013 10:46:32 +0000 (10:46 +0000)]
MFC: r253506
The NFSv4 server incorrectly assumed that the high order words of
the attribute bitmap argument would be non-zero. This caused an
interoperability problem for a recent patch to the Linux NFSv4 client.
The Linux folks have changed their patch to avoid this, but this
patch fixes the problem on the server.

Reported and tested by: a.heider@gmail.com (Andre Heider)
Approved by: re (Xin Li)

git-svn-id: svn://svn.freebsd.org/base/stable/9@253608 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years ago1) POSIX requires rand(3) return values to be in the [0, RAND_MAX]
ache [Wed, 24 Jul 2013 10:12:50 +0000 (10:12 +0000)]
1) POSIX requires rand(3) return values to be in the [0, RAND_MAX]
range, but ACM formula we use have internal state (and return value) in
the [1, 0x7ffffffe] range, so our RAND_MAX (0x7fffffff) is never reached
because it is off by one, zero is not reached too.

Correct both RAND_MAX and rand(3) return value, shifting last one
to the 0 by 1 subtracted, resulting POSIXed [0, 0x7ffffffd(=new
RAND_MAX)] range.

2) Add a checks for not overflowing on too big seeds. It may happens on
the machines, where sizeof(unsigned int) > 32 bits.

This change is binary compatible because range is reduced, not expanded,
so no bump is needed.

Reviewed by:    bde
Approved by:    re (glebius)

git-svn-id: svn://svn.freebsd.org/base/stable/9@253607 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC 253433:
rodrigc [Wed, 24 Jul 2013 01:08:45 +0000 (01:08 +0000)]
MFC 253433:

    In this GRN, Marcel Moolenaar overhauled the logic for mounting
    the root file system on bootup:

       |------------------------------------------------------------------------
       |r214006 | marcel | 2010-10-17 22:01:53 -0700 (Sun, 17 Oct 2010) | 20 lines
       |
       | Re-implement the root mount logic using a recursive approach, whereby each
       |root file system (starting with devfs and a synthesized configuration) can
       |contain directives for mounting another file system as root.
       |------------------------------------------------------------------------

    This commit adds a mount.conf(8) man page which documents
    the root mount logic.  mount.conf(8) also provides some examples
    for the /.mount.conf file, which can be used to change the root mount behavior.

    Reviewed by: marcel bjk

MFC: 253445:

    Minor mdoc fixes

Approved by: re (gjb)

git-svn-id: svn://svn.freebsd.org/base/stable/9@253586 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r253434:
jimharris [Tue, 23 Jul 2013 22:53:01 +0000 (22:53 +0000)]
MFC r253434:

  Add bus_dmamap_load_bio and bus_dmamap_load_ccb to bus_dma(9).

Approved by: re (marius)

git-svn-id: svn://svn.freebsd.org/base/stable/9@253584 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoUpdate stable/9 to -BETA1 status.
gjb [Fri, 19 Jul 2013 12:43:20 +0000 (12:43 +0000)]
Update stable/9 to -BETA1 status.

Approved by: re (implicit)
Approved by: kib (mentor, implicit)

git-svn-id: svn://svn.freebsd.org/base/stable/9@253470 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r253280:
kib [Fri, 19 Jul 2013 05:32:08 +0000 (05:32 +0000)]
MFC r253280:
Only copy as much bytes as there in superblock, instead of the full
block copy, when copying the superblock into the snapshot.  UFS1 does
not align superblock on the block boundary, and bcopy runs off the end
of the buffer.

Approved by: re (hrs)

git-svn-id: svn://svn.freebsd.org/base/stable/9@253465 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r253398:
kib [Fri, 19 Jul 2013 05:28:47 +0000 (05:28 +0000)]
MFC r253398:
Add a tunable to force disable MSI use for xhci(4).

Approved by: re (delphij)

git-svn-id: svn://svn.freebsd.org/base/stable/9@253464 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoAdd cdrom.inf into CD/DVD installation media. sysinstall(8) requires
hrs [Fri, 19 Jul 2013 02:54:23 +0000 (02:54 +0000)]
Add cdrom.inf into CD/DVD installation media.  sysinstall(8) requires
this file to recognize the volume number.

Approved by: re (marius)

git-svn-id: svn://svn.freebsd.org/base/stable/9@253462 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC 252576:
jhb [Wed, 17 Jul 2013 14:04:18 +0000 (14:04 +0000)]
MFC 252576:
Don't perform the acpi_DeviceIsPresent() check for PCI-PCI bridges.  If
we are probing a PCI-PCI bridge it is because we found one by enumerating
the devices on a PCI bus, so the bridge is definitely present.  A few
BIOSes report incorrect status (_STA) for some bridges that claimed they
were not present when in fact they were.

While here, move this check earlier for Host-PCI bridges so attach fails
before doing any work that needs to be torn down.

PR: kern/91594
Approved by: re (marius)

git-svn-id: svn://svn.freebsd.org/base/stable/9@253426 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r230453:
hrs [Wed, 17 Jul 2013 13:24:10 +0000 (13:24 +0000)]
MFC r230453:

- Configurations in ipv6_prefix_IF should be recognized even if there is no
  ifconfig_IF_ipv6.

- DAD wait should be performed at once, not on a per-interface basis, if
  possible.  This fixes an issue that a system with a lot of IPv6-capable
  interfaces takes too long for booting.

Approved by: re (glebius)

git-svn-id: svn://svn.freebsd.org/base/stable/9@253422 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r253141:
kib [Wed, 17 Jul 2013 10:35:57 +0000 (10:35 +0000)]
MFC r253141:
When panicing due to the gjournal overflow, print the geom metadata
journal id.

Approved by: re (rodrigc)

git-svn-id: svn://svn.freebsd.org/base/stable/9@253415 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r253079: dtrace/fasttrap: install hook functions only after all data
avg [Tue, 16 Jul 2013 15:51:32 +0000 (15:51 +0000)]
MFC r253079: dtrace/fasttrap: install hook functions only after all data
is initialized

Approved by: re (marius)

git-svn-id: svn://svn.freebsd.org/base/stable/9@253394 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r253078: audit_proc_coredump: check return value of audit_new
avg [Tue, 16 Jul 2013 11:15:05 +0000 (11:15 +0000)]
MFC r253078: audit_proc_coredump: check return value of audit_new

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@253388 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r253075: namecache sdt: freebsd doesn't support structured
avg [Tue, 16 Jul 2013 08:16:04 +0000 (08:16 +0000)]
MFC r253075: namecache sdt: freebsd doesn't support structured
characters yet

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@253382 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r253094:
kib [Tue, 16 Jul 2013 06:50:22 +0000 (06:50 +0000)]
MFC r253094:
Use MSI for xhci(4), if supported.

Approved by: re (delphij)

git-svn-id: svn://svn.freebsd.org/base/stable/9@253379 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: r253284, r253285, r253303:
jfv [Mon, 15 Jul 2013 23:27:48 +0000 (23:27 +0000)]
MFC: r253284, r253285, r253303:

Correct the Intel network driver module builds. They were not
defining INET or INET6, and in the case of ixgbe this will cause
a panic in the TSO setup code, but in all cases the ioctl behavior
is different, this change makes the module and static consistent.

Approved by: re

git-svn-id: svn://svn.freebsd.org/base/stable/9@253374 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMerge r244451 from head (originally by pjd):
gavin [Mon, 15 Jul 2013 23:12:42 +0000 (23:12 +0000)]
Merge r244451 from head (originally by pjd):
  Use correct file permissions when looking for available core file if
  kern.corefile contains %I.

Discussed with: pjd (some time ago)
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@253373 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC of 253330
mjacob [Mon, 15 Jul 2013 20:33:54 +0000 (20:33 +0000)]
MFC of 253330

When fiddling with options of which registers to copy out for
a mailbox command and which registers to copy back in when
the command completes, the bits being set need to not only
specify what bits you want to add from the default from the
table but also what bits you want *subtract* (mask) from the
default from the table.

A failing ISP2200 command pointed this out.

Approved by: re

git-svn-id: svn://svn.freebsd.org/base/stable/9@253371 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r253274 and r253368:
ken [Mon, 15 Jul 2013 18:02:26 +0000 (18:02 +0000)]
MFC r253274 and r253368:

  r253274 | ken | 2013-07-12 11:09:50 -0600 (Fri, 12 Jul 2013) | 40 lines

  Fix a problem with READ ELEMENT STATUS that occurs on some
  changers that don't support the DVCID and CURDATA bits that were
  introduced in the SMC spec.

  These changers will return an Illegal Request type error if the
  bits are set.  This causes "chio status" to fail.

  The fix is two-fold.  First, for changers that claim to be SCSI-2
  or older, don't set the DVCID and CURDATA bits for READ ELEMENT
  STATUS.  For newer changers (SCSI-3 and newer), we default to
  setting the new bits, but back off and try the READ ELEMENT STATUS
  without the bits if we get an Illegal Request type error.

  This has been tested on a Qualstar TLS-8211, which is a SCSI-2
  changer that does not support the new bits, and a Spectra T-380,
  which is a SCSI-3 changer that does support the new bits.  In the
  absence of a SCSI-3 changer that does not support the bits, I
  tested that with some error injection code.  (The SMC spec says
  that support for CURDATA is mandatory, and DVCID is optional.)

  scsi_ch.c: Add a new quirk, CH_Q_NO_DVCID that gets set for
   SCSI-2 and older libraries, or newer libraries that
   report errors when the DVCID/CURDATA bits are set.

   In chgetelemstatus(), use the new quirk to
   determine whether or not to set DVCID and CURDATA.
   If we get an error with the bits set, back off and
   try without the bits.  Set the quirk flag if the
   read element status succeeds without the bits set.

   Increase the READ ELEMENT STATUS timeout to 60
   seconds after testing with a Spectra T-380.  The
   previous value was 10 seconds, and too short for
   the T-380.  This may be decreased later after
   some additional testing and investigation.

  Tested by: Andre Albsmeier <Andre.Albsmeier@siemens.com>
  Sponsored by: Spectra Logic

  ------------------------------------------------------------------------
  r253368 | ken | 2013-07-15 10:38:48 -0600 (Mon, 15 Jul 2013) | 5 lines

  Fix an argument reversal in calls to scsi_read_element_status().

  Reported by: Ulrich Spoerlein <uqs@FreeBSD.org>

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@253369 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r253209:
jimharris [Mon, 15 Jul 2013 15:38:16 +0000 (15:38 +0000)]
MFC r253209:

  Fix a poorly worded comment in nvme(4).

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@253366 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r253178:
jimharris [Mon, 15 Jul 2013 15:37:13 +0000 (15:37 +0000)]
MFC r253178:

  Bump date for nvme(4) and nvd(4).

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@253365 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r253290:
gjb [Mon, 15 Jul 2013 14:59:45 +0000 (14:59 +0000)]
MFC r253290:
 Document that a literal jail name of 0 (zero) is not allowed.

PR: 174436
Approved by: re (glebius)

git-svn-id: svn://svn.freebsd.org/base/stable/9@253363 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r235899:
mav [Mon, 15 Jul 2013 11:45:58 +0000 (11:45 +0000)]
MFC r235899:
Hide warning behind bootverbose. Average user has nothing to do about it.

Approved by: re (marius)

git-svn-id: svn://svn.freebsd.org/base/stable/9@253359 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r253224:
cperciva [Sun, 14 Jul 2013 07:58:10 +0000 (07:58 +0000)]
MFC r253224:
  Fix bug in deleting files: If two ports had the same tarball and one of
  them changed (or was removed from the tree) then portsnap would delete
  that file.  This happened earlier today when one of two empty port
  directories was removed.  Uniquifying the lists of needed files fixes
  this.

Approved by: re (delphij)

git-svn-id: svn://svn.freebsd.org/base/stable/9@253337 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC of 252527:
mckusick [Sat, 13 Jul 2013 18:09:42 +0000 (18:09 +0000)]
MFC of 252527:

Make better use of metadata area by avoiding using it for data blocks
that no should no longer immediately follow their indirect blocks.

Reviewed by: Bruce Evans
Approved by: re (marius@)

git-svn-id: svn://svn.freebsd.org/base/stable/9@253324 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFH (r253138,r253258): install authpf-noip
des [Sat, 13 Jul 2013 10:47:17 +0000 (10:47 +0000)]
MFH (r253138,r253258): install authpf-noip

Approved by: re (delphij)

git-svn-id: svn://svn.freebsd.org/base/stable/9@253320 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r253116:
jimharris [Fri, 12 Jul 2013 22:16:43 +0000 (22:16 +0000)]
MFC r253116:

  Ensure controller or namespace node name is specified before trying to
  access it.

  While here, also fix the identify usage message to show the -v and -x
  parameters.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@253302 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r253115:
jimharris [Fri, 12 Jul 2013 22:15:50 +0000 (22:15 +0000)]
MFC r253115:

  Condense the output for displaying LBA formats.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@253301 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r253114:
jimharris [Fri, 12 Jul 2013 22:14:57 +0000 (22:14 +0000)]
MFC r253114:

  Send per-namespace logpage commands to the controller devnode, so they
  are processed as admin commands, not I/O commands.

  As part of this change, pull out the code for parsing a namespace node
  string into a separate function, since it is used for both identify and
  logpage commands.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@253300 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r253110:
jimharris [Fri, 12 Jul 2013 22:13:46 +0000 (22:13 +0000)]
MFC r253110:

  Try to read firmware image before prompting the user to confirm
  firmware download.  This correctly prints an error and exits for
  an incorrect firmware image name before prompting the user to
  confirm the download.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@253299 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r253109, r253279:
jimharris [Fri, 12 Jul 2013 22:12:48 +0000 (22:12 +0000)]
MFC r253109, r253279:

r253109:
  Incorporate feedback from bde@ based on r252672 changes:

  * Use 0/1 instead of sysexits.  Man pages are confusing on this topic,
    but 0/1 is sufficient for nvmecontrol.
  * Use err function family where possible instead of fprintf/exit.
  * Fix some typing errors.
  * Clean up some error message inconsistencies.

r253279:
  %d should be used for printing int32_t instead of %zd.

  clang does not complain about this - only gcc.

Incorporated r253279 prior to MFC timeout because it is required for gcc
builds.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@253298 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r253113:
jimharris [Fri, 12 Jul 2013 22:08:24 +0000 (22:08 +0000)]
MFC r253113:

  Add comment explaining why CACHE_LINE_SIZE is defined in nvme_private.h
  if not already defined elsewhere.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@253297 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r253112:
jimharris [Fri, 12 Jul 2013 22:07:33 +0000 (22:07 +0000)]
MFC r253112:

  Update copyright dates.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@253296 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r253108:
jimharris [Fri, 12 Jul 2013 22:06:17 +0000 (22:06 +0000)]
MFC r253108:

  Do not retry failed async event requests.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@253295 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r253107:
jimharris [Fri, 12 Jul 2013 22:05:17 +0000 (22:05 +0000)]
MFC r253107:

  Add pci_enable_busmaster() and pci_disable_busmaster() calls in
  nvme_attach() and nvme_detach() respectively.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@253294 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r253111:
jimharris [Fri, 12 Jul 2013 22:03:46 +0000 (22:03 +0000)]
MFC r253111:

Update nvme(4) and nvd(4) to reflect recent work and upcoming inclusion
in 9.2 release.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@253293 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r252294 and r252295:
remko [Fri, 12 Jul 2013 22:03:41 +0000 (22:03 +0000)]
MFC r252294 and r252295:

Add support for the NTT Docomo L-02C Card

PR: 180017
Submitted by: Masaharu FUJITA
Glanced at by: imp
Approved by: re (delphij)

git-svn-id: svn://svn.freebsd.org/base/stable/9@253292 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r241479:
jimharris [Fri, 12 Jul 2013 22:02:35 +0000 (22:02 +0000)]
MFC r241479:

Remove whitespace.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@253291 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r241431:
jimharris [Fri, 12 Jul 2013 22:01:18 +0000 (22:01 +0000)]
MFC r241431:

Add man pages for nvme(4) and nvd(4).

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@253289 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoUpdate clang's target triple for FreeBSD 9.2-PRERELEASE.
dim [Fri, 12 Jul 2013 20:06:52 +0000 (20:06 +0000)]
Update clang's target triple for FreeBSD 9.2-PRERELEASE.

Approved by: re (delphij)

git-svn-id: svn://svn.freebsd.org/base/stable/9@253283 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r252710:
trociny [Fri, 12 Jul 2013 18:54:47 +0000 (18:54 +0000)]
MFC r252710:

In r227207, to fix the issue with possible NULL inp_socket pointer
dereferencing, when checking for SO_REUSEPORT option (and SO_REUSEADDR
for multicast), INP_REUSEPORT flag was introduced to cache the socket
option.  It was decided then that one flag would be enough to cache
both SO_REUSEPORT and SO_REUSEADDR: when processing SO_REUSEADDR
setsockopt(2), it was checked if it was called for a multicast address
and INP_REUSEPORT was set accordingly.

Unfortunately that approach does not work when setsockopt(2) is called
before binding to a multicast address: the multicast check fails and
INP_REUSEPORT is not set.

Fix this by adding INP_REUSEADDR flag to unconditionally cache
SO_REUSEADDR.

PR: 179901
Submitted by: Michael Gmelin freebsd grem.de (initial version)
Reviewed by: rwatson
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@253281 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: r240981, r240990, r240992, r244695
marius [Fri, 12 Jul 2013 18:02:10 +0000 (18:02 +0000)]
MFC: r240981, r240990, r240992, r244695

Add 32-bit ABI compat shims. Those are necessary for i386 binary-only
tools like sysutils/hpacucli (HP P4xx RAID controller management
suite) working on amd64 systems.

PR: 139271
Submitted by: Kazumi MORINAGA, Eugene Grosbein
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@253278 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: r253120
marius [Fri, 12 Jul 2013 16:41:58 +0000 (16:41 +0000)]
MFC: r253120

- As it turns out, not only MSI-X is broken for devices passed through by
  VMware up to at least ESXi 5.1. Actually, using INTx in that case instead
  may still result in interrupt storms, with MSI being the only working
  option in some configurations. So introduce a PCI_QUIRK_DISABLE_MSIX quirk
  which only blacklists MSI-X but not also MSI and use it for the VMware
  PCI-PCI-bridges. Note that, currently, we still assume that if MSI doesn't
  work, MSI-X won't work either - but that's part of the internal logic and
  not guaranteed as part of the API contract. While at it, add and employ
  a pci_has_quirk() helper.
  Reported and tested by: Paul Bucher
- Use NULL instead of 0 for pointers.

Submitted by: jhb (mostly)
Approved by: re (hrs), jhb

git-svn-id: svn://svn.freebsd.org/base/stable/9@253273 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r253104:
tuexen [Fri, 12 Jul 2013 14:58:09 +0000 (14:58 +0000)]
MFC r253104:
Fix a bug where SCTP_ENABLE_STREAM_RESET is not handled by
sctp_opt_info().

MFC r253105:
Fix the handling of SCTP_CURRENT_ASSOC and SCTP_ALL_ASSOC in
sctp_opt_info().

Approved by: re@

git-svn-id: svn://svn.freebsd.org/base/stable/9@253269 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r253099:
tuexen [Fri, 12 Jul 2013 12:40:21 +0000 (12:40 +0000)]
MFC r253099:
Use IPSECSTAT_INC() and IPSEC6STAT_INC() macros for ipsec statistics
accounting.

Approved by: re@

git-svn-id: svn://svn.freebsd.org/base/stable/9@253263 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r251282:
kib [Fri, 12 Jul 2013 10:07:48 +0000 (10:07 +0000)]
MFC r251282:
When auto-sizing the buffer cache, limit the amount of physical memory
used as the estimation of size, to 16GB.  This provides around 100K of
buffer headers and corresponding KVA for buffer map at the peak.
Sizing the cache larger is not useful, also resulting in the wasting
and exhausting of KVA for large machines.

MFC note: the commit message was adjusted to match the code change, the
sizing cap is for 16GB, as noted by delphij.

Approved by: re (delphij)

git-svn-id: svn://svn.freebsd.org/base/stable/9@253259 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r253095:
kib [Fri, 12 Jul 2013 10:02:47 +0000 (10:02 +0000)]
MFC r253095:
Fix typo in comment.

Approved by: re (hrs)

git-svn-id: svn://svn.freebsd.org/base/stable/9@253257 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r245066
grehan [Fri, 12 Jul 2013 05:45:09 +0000 (05:45 +0000)]
MFC r245066
-------------------------------------------------------------------------
Teach the kernel to recognize that it is executing inside a bhyve virtual
machine.
-------------------------------------------------------------------------

This will help a 9.2 guest to run more effectively as a bhyve guest.

Reviewed by: neel
Approved by: re

git-svn-id: svn://svn.freebsd.org/base/stable/9@253250 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r253134:
yongari [Fri, 12 Jul 2013 02:28:01 +0000 (02:28 +0000)]
MFC r253134:
  Avoid controller reinitialization which could be triggered by
  dhclient(8) or alias addresses are added.

git-svn-id: svn://svn.freebsd.org/base/stable/9@253245 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r251516
sbruno [Fri, 12 Jul 2013 02:26:15 +0000 (02:26 +0000)]
MFC r251516

Implement foreign device handling.

PR: kern/172091

git-svn-id: svn://svn.freebsd.org/base/stable/9@253244 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC 245015:
hrs [Fri, 12 Jul 2013 02:11:42 +0000 (02:11 +0000)]
MFC 245015:

Print the flags= part only when flags != 0.

git-svn-id: svn://svn.freebsd.org/base/stable/9@253243 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC 253058:
hrs [Fri, 12 Jul 2013 01:59:30 +0000 (01:59 +0000)]
MFC 253058:

- Add missing "static" keywords.
- Add a check for ifindex to if_indextoifinfo().  It returns NULL when
  if_indextoname() fails.

git-svn-id: svn://svn.freebsd.org/base/stable/9@253242 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC 253066:
hrs [Fri, 12 Jul 2013 01:56:05 +0000 (01:56 +0000)]
MFC 253066:

Update references.

git-svn-id: svn://svn.freebsd.org/base/stable/9@253241 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC 253093:
hrs [Fri, 12 Jul 2013 01:55:28 +0000 (01:55 +0000)]
MFC 253093:

Make mandoc lint happy.

git-svn-id: svn://svn.freebsd.org/base/stable/9@253240 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC 232379, 252511, 252548, 253060:
hrs [Fri, 12 Jul 2013 01:52:31 +0000 (01:52 +0000)]
MFC 232379, 252511, 252548, 253060:

- Allow to configure net.inet6.ip6.{accept_rtadv,no_radr} by the
  loader tunables as well because they have to be configured before
  interface initialization for AF_INET6.

- Allow ND6_IFF_AUTO_LINKLOCAL for IFT_BRIDGE.  An interface with IFT_BRIDGE
  is initialized with !ND6_IFF_AUTO_LINKLOCAL && !ND6_IFF_ACCEPT_RTADV
  regardless of net.inet6.ip6.accept_rtadv and net.inet6.ip6.auto_linklocal.
  To configure an autoconfigured link-local address (RFC 4862), the
  following rc.conf(5) configuration can be used:

   ifconfig_bridge0_ipv6="inet6 auto_linklocal"

- if_bridge(4) now removes IPv6 addresses on a member interface to be
  added when the parent interface or one of the existing member
  interfaces has an IPv6 address.  if_bridge(4) merges each link-local
  scope zone which the member interfaces form respectively, so it causes
  address scope violation.  Removal of the IPv6 addresses prevents it.

- if_lagg(4) now removes IPv6 addresses on a member interfaces
  unconditionally.

- Set reasonable flags to non-IPv6-capable interfaces.

git-svn-id: svn://svn.freebsd.org/base/stable/9@253239 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC 251584:
hrs [Fri, 12 Jul 2013 01:34:24 +0000 (01:34 +0000)]
MFC 251584:

Add :ifname modifier to specify interface-specific routes into
{,ipv6_}static_routes and rc.d/routing.  For example:

 static_routes="foo bar:em0"
 route_foo="-net 10.0.0.0/24 -gateway 192.168.2.1"
 route_bar="-net 192.168.1.0/24 -gateway 192.168.0.2"

At boot time, all of the static routes are installed as before.
The differences are:

- "/etc/rc.d/netif start/stop <if>" now configures static routes
  with :<if> if any.
- "/etc/rc.d/routing start/stop <af> <if>" works as well.  <af> cannot be
  omitted when <if> is specified, but a keyword "any" or "all" can be used
  for <af> and <if>.

git-svn-id: svn://svn.freebsd.org/base/stable/9@253238 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC 251581:
hrs [Fri, 12 Jul 2013 01:29:57 +0000 (01:29 +0000)]
MFC 251581:

Fix a bug that the gateway address was not shown when a -gateway modifier
was used.

git-svn-id: svn://svn.freebsd.org/base/stable/9@253237 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC 245168:
hrs [Fri, 12 Jul 2013 01:27:11 +0000 (01:27 +0000)]
MFC 245168:

Fix -iface and -interface modifiers.

git-svn-id: svn://svn.freebsd.org/base/stable/9@253236 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC 244325:
hrs [Fri, 12 Jul 2013 01:25:24 +0000 (01:25 +0000)]
MFC 244325:

- Fix strtol() error handling.
- Add a range condition of given FIB number and the related error messages.
- Fix free() problem.

git-svn-id: svn://svn.freebsd.org/base/stable/9@253235 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC 243185, 243188, 243212:
hrs [Fri, 12 Jul 2013 01:23:41 +0000 (01:23 +0000)]
MFC 243185, 243188, 243212:

Add -fib modifier to specify FIB number.  The FIB number can be in a
comma-separated list and/or range specification:

 # route add -inet 192.0.2.0/24 198.51.100.1 -fib 1,3-5,6

Although all of the subcommands supports the modifier, "monitor" does not
support the list or range specification at this moment.

git-svn-id: svn://svn.freebsd.org/base/stable/9@253234 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC 242184:
hrs [Fri, 12 Jul 2013 01:16:19 +0000 (01:16 +0000)]
MFC 242184:

Add setfib(1) support for services as <name>_fib in rc.conf.

git-svn-id: svn://svn.freebsd.org/base/stable/9@253233 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC 242301:
hrs [Fri, 12 Jul 2013 01:12:28 +0000 (01:12 +0000)]
MFC 242301:

Load ipdivert.ko when natd_enable=YES.

PR: conf/167566

git-svn-id: svn://svn.freebsd.org/base/stable/9@253232 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC 243324:
hrs [Fri, 12 Jul 2013 01:08:12 +0000 (01:08 +0000)]
MFC 243324:

Do not put "already running" message when rc_quiet=yes.

PR: bin/165477

git-svn-id: svn://svn.freebsd.org/base/stable/9@253231 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC 243441:
hrs [Fri, 12 Jul 2013 01:06:08 +0000 (01:06 +0000)]
MFC 243441:

Support a flag for ALLOW/BLOCK in source-specific multicast (RFC 4604).

git-svn-id: svn://svn.freebsd.org/base/stable/9@253230 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC 230453, 230726, 252015, 252426:
hrs [Fri, 12 Jul 2013 00:40:49 +0000 (00:40 +0000)]
MFC 230453, 230726, 252015, 252426:

- ipv6_enable + ipv6_gateway_enable should unset ACCEPT_RTADV by default for
  backward compatibility.

- Configurations in ipv6_prefix_IF should be recognized even if there is no
  ifconfig_IF_ipv6.

- DAD wait should be performed at once, not on a per-interface basis, if
  possible.  This fixes an issue that a system with a lot of IPv6-capable
  interfaces takes too long for booting.

- Add CIDR notation support like 192.168.1-2.10-16/24 to $ifconfig_IF_aliasN.
  This is an extended version of ipv4_addr_IF which supports both IPv4 and
  IPv6, and multiple range specifications.  To avoid to generate too many
  addresses, the maximum number of the generated addresses is currently
  limited to 31.

- Add $ifconfig_IF_aliases, which accepts multiple IP aliases in a variable.

- ipv6_prefix_IF now supports !/64 prefix length.  In addition to the old
  64-bit format (2001:db8:1:1), a full 128-bit format like 2001:db8:1:1::/64
  is supported.

- Replace ifconfig command with $IFCONFIG_CMD variable to support
  a dry-run mode in the future.

- Remove IP aliases before removing all of IPv4 addresses when doing
  "rc.d/netif down".

- Add a DAD wait to network6_getladdr() because it is possible to fail to
  configure an EUI64 address when ipv6_prefix_IF is specified.

git-svn-id: svn://svn.freebsd.org/base/stable/9@253227 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f