]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/log
FreeBSD/stable/10.git
8 years agoMFC r283692:
kib [Fri, 5 Jun 2015 08:23:33 +0000 (08:23 +0000)]
MFC r283692:
Explicitely enable queued invalidation completion interrupt.

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

8 years agoMFC r271918 (by hrs):
ae [Fri, 5 Jun 2015 08:10:08 +0000 (08:10 +0000)]
MFC r271918 (by hrs):
  - Virtualize interface cloner for gre(4).  This fixes a panic when destroying
    a vnet jail which has a gre(4) interface.

  - Make net.link.gre.max_nesting vnet-local.

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

8 years agoRework r281868 to not skip RTM announces for tunneling interfaces.
ae [Fri, 5 Jun 2015 07:23:32 +0000 (07:23 +0000)]
Rework r281868 to not skip RTM announces for tunneling interfaces.
This is direct commit to stable/10.

Tested by: tuexen@

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

8 years agoMFC r283922:
hselasky [Fri, 5 Jun 2015 07:17:14 +0000 (07:17 +0000)]
MFC r283922:
Fix for control endpoint handling in the DWC OTG driver. The data
stage processing is only allowed after the setup complete event has
been received. Else a race may occur and the OUT data can be corrupted.
While at it ensure resetting a FIFO has the required wait loop.

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

8 years agoMFC r273955,274060,274164: Add /etc/rc.d/growfs script.
cperciva [Fri, 5 Jun 2015 00:46:49 +0000 (00:46 +0000)]
MFC r273955,274060,274164: Add /etc/rc.d/growfs script.

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

8 years agoMFC r283257:
delphij [Fri, 5 Jun 2015 00:39:34 +0000 (00:39 +0000)]
MFC r283257:

Eliminate unneeded includes.

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

8 years agoMFC r283936: Restore AHCI quirks printing as base16.
mav [Fri, 5 Jun 2015 00:35:17 +0000 (00:35 +0000)]
MFC r283936: Restore AHCI quirks printing as base16.

smh@ at r278034 made it base17, that is somewhat odd. :)

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

8 years agoMFC r283919:
gjb [Fri, 5 Jun 2015 00:28:38 +0000 (00:28 +0000)]
MFC r283919:
  Remove trailing tabs to avoid spamming stdout with long lines.

Sponsored by: The FreeBSD Foundation

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

8 years agoMFC: Merge more of the dtb machinery
imp [Thu, 4 Jun 2015 22:11:39 +0000 (22:11 +0000)]
MFC: Merge more of the dtb machinery

Merge 278459,278460,278461,278462 which define DTBDIR and other things
needed for install to work. Although the commit in head kinda fixed
install_as_user, it's unknown if that works in 10.x (it didn't the last
time I tried).

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

8 years agoMFC: r283661
slm [Thu, 4 Jun 2015 16:27:18 +0000 (16:27 +0000)]
MFC: r283661
- Updated all files with 2015 Avago copyright, and updated LSI's copyright
  dates.

- Changed all of the PCI device strings from LSI to Avago Technologies (LSI).

- Added a sysctl variable to control how StartStopUnit behavior works. User can
  select to spin down disks based on if disk is SSD or HDD.

- Inquiry data is required to tell if a disk will support SSU at shutdown or
  not. Due to the addition of mprssas_async, which gets Advanced Info but not
  Inquiry data, the setting of supports_SSU was moved to the
  mprsas_scsiio_complete function, which snoops for any Inquiry commands. And,
  since disks are shutdown as a target and not a LUN, this process was
  simplified by basing it on targets and not LUNs.

- Added a sysctl variable that sets the amount of time to retry after sending a
  failed SATA ID command. This helps with some bad disks and large disks that
  require a lot of time to spin up. Part of this change was to add a callout to
  handle timeouts with the SATA ID command. The callout function is called
  mprsas_ata_id_timeout(). (Fixes PR 191348)

- Changed the way resets work by allowing I/O to continue to devices that are
  not currently under a reset condition. This uses devq's instead of simq's and
  makes use of the MPSSAS_TARGET_INRESET flag. This change also adds a function
  called mprsas_prepare_tm().

- Some changes were made to reduce code duplication when getting a SAS address
  for a SATA disk.

- Fixed some formatting and whitespace.

- Bump version of mpr driver to 9.255.01.00-fbsd

PR: 191348

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

8 years agoMFC: r283273
rmacklem [Thu, 4 Jun 2015 12:35:00 +0000 (12:35 +0000)]
MFC: r283273
The NFS client wasn't handling getdirentries(2) requests for sizes
that are not an exact multiple of DIRBLKSIZ correctly. Fortunately
readdir(3) always uses an exact multiple of DIRBLKSIZ, so few applications
were affected. This patch fixes this problem by reducing the size
of the directory read to an exact multiple of DIRBLKSIZ.

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

8 years agoMFC r283641:
pkelsey [Thu, 4 Jun 2015 04:54:54 +0000 (04:54 +0000)]
MFC r283641:

Add CAP_FCNTL to the lease file capsicum rights, and limit to
CAP_FCNTL_GETFL.  Without CAP_FCNTL_GETFL, the lease file truncation
in rewrite_client_leases() will fail to trim old data when rewriting
the file with a lesser amount of data.

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

8 years agoMFC r283652:
pkelsey [Thu, 4 Jun 2015 04:50:52 +0000 (04:50 +0000)]
MFC r283652:

Provide an unambiguous description of the potential hazard in calling
pthread_setspecific(3) from a key destructor.

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

8 years agoMFC r262955:
ian [Thu, 4 Jun 2015 01:52:17 +0000 (01:52 +0000)]
MFC r262955:

Add 3wire and std as terminal types/classes. These are similar to
the existing terminal types/classes that have the baudrate suffix,
but differ in that no baudrate is set/defined.

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

8 years agoMFC r268254 (jmg):
dteske [Wed, 3 Jun 2015 22:24:57 +0000 (22:24 +0000)]
MFC r268254 (jmg):
Add a hint that you can enable this by default if you want;
necessary if you want the keyboard break to work early in boot.

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

8 years agoMFC r259438 by pjd: Fix syscalls that can be loaded as kernel modules
emaste [Wed, 3 Jun 2015 18:33:47 +0000 (18:33 +0000)]
MFC r259438 by pjd: Fix syscalls that can be loaded as kernel modules

  They were not given the flag allowing to call them from capability
  mode sandbox.

And regenerate init_sysent.c

Sponsored by: The FreeBSD Foundation

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

8 years agoMFC r283784:
tuexen [Wed, 3 Jun 2015 17:45:45 +0000 (17:45 +0000)]
MFC r283784:
Remove trailing whitespaces.

MFC r283785:
Require the embedded packet to contain 8 bytes after the IP header instead
of only 4. This is guaranteed by RFC 792 and the verification of GRE, ICMP
and TCP packets use 8 bytes.

MFC r283786:
There is no payload anymore. So compute the minimum packet length
correctly and use 40 as the default (if the minumum allows it), as
specified in the man page.

MFC r283806:
When the packet verification fails in verbose mode, print the correct
number of words in host byte order. Also remove a stray 'x'.

MFC r283808:
Don't send malformed SCTP probe packets.

MFC r283813:
Use an empty string for field descriptions of unknown protocols.

MFC r283817:
Don't send illegal packets when using UDP-Lite.

MFC r283819:
A TCP checksum of 0 is completely valid. Mapping 0 to 0xffff only
applies to UDP and UDP-Lite.

MFC r283820:
The code starts with base + 1 as the first port. Fix to documentation
to match that.

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

8 years agoMFC r283103:
hselasky [Wed, 3 Jun 2015 15:41:03 +0000 (15:41 +0000)]
MFC r283103:
Fix for DWC OTG device side isochronous transfers. The even or odd
isochronous frame bit needs to be flipped.

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

8 years agoMFC r282650 and r282651:
hselasky [Wed, 3 Jun 2015 15:32:43 +0000 (15:32 +0000)]
MFC r282650 and r282651:
Extend the maximum number of allowed PCM channels in a PCM stream to
127 and decrease the maximum number of sub-channels to 1. These
definitions are only used inside the kernel and can be changed later
if more than one sub-channel is desired. This has been done to allow
so-called USB audio rack modules to work with FreeBSD.

Add support for more than 8 audio channels per PCM stream for USB
audio class compliant devices under FreeBSD. Tested using 16 recording
and 16 playback audio channels simultaneously.

Bump the FreeBSD version to force recompiling all external modules.

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

8 years agoMFC r261220 by csjp: Allow sigwait(2) in capabilities mode.
emaste [Wed, 3 Jun 2015 13:12:08 +0000 (13:12 +0000)]
MFC r261220 by csjp: Allow sigwait(2) in capabilities mode.

  It's common for multi-threaded processes to create a thread for
  the purpose of synchronously processing signals. Allow such processes to
  utilize a capabilities sandbox.

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

8 years agoMFC r259436,259437 by pjd: Allow for pselect(2) in capability mode.
emaste [Wed, 3 Jun 2015 13:10:25 +0000 (13:10 +0000)]
MFC r259436,259437 by pjd: Allow for pselect(2) in capability mode.

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

8 years agoRegen for r283940.
emaste [Wed, 3 Jun 2015 11:39:29 +0000 (11:39 +0000)]
Regen for r283940.

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

8 years agoMFC r257736 (by pjd):
emaste [Wed, 3 Jun 2015 11:36:47 +0000 (11:36 +0000)]
MFC r257736 (by pjd):

  - Remove mac_get_fd/mac_set_fd - those are not syscalls. The
    __mac_get_fd() and __mac_set_fd() syscalls are listed earlier.
  - Correct typo in syscall name. It should be sched_rr_get_interval,
    not sched_rr_getinterval.

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

8 years agoMFC r283146:
ae [Wed, 3 Jun 2015 02:50:58 +0000 (02:50 +0000)]
MFC r283146:
  In the reply to SADB_X_SPDGET message use the same sequence number that
  was in the request. Some IKE deamons expect it will the same. Linux and
  NetBSD also follow this behaviour.

  PR: 137309

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

8 years agoMFC:
imp [Tue, 2 Jun 2015 21:36:45 +0000 (21:36 +0000)]
MFC:

r283014: Disable unmapped I/O: it is broken for unaligned pages
r283126: Fix comments

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

8 years agoMFC:
imp [Tue, 2 Jun 2015 21:24:47 +0000 (21:24 +0000)]
MFC:

Merge r276846: Add infrastructure to build dtb files from dts files.

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

8 years agoMFC r265950 (by thomas):
pjd [Tue, 2 Jun 2015 20:29:58 +0000 (20:29 +0000)]
MFC r265950 (by thomas):

Add mention of metadata version 7 in FreeBSD 10.0.

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

8 years agoMFC 281887:
jhb [Tue, 2 Jun 2015 19:20:39 +0000 (19:20 +0000)]
MFC 281887:
Reassign copyright statements on several files from Advanced
Computing Technologies LLC to Hudson River Trading LLC.

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

8 years agoMFC 282417:
jhb [Tue, 2 Jun 2015 15:12:33 +0000 (15:12 +0000)]
MFC 282417:
Various updates to the ftruncate(2) documentation:
- Note that ftruncate(2) can operate on shared memory objects and cross
  reference shm_open(2).
- Note that ftruncate(2) does not change the file position pointer (aka
  seek pointer) of the file descriptor.
- ftruncate(2) will fail with EINVAL for all sorts of other fd types than
  just sockets, so instead note that it fails for all but regular files and
  shared memory objects.
- Note that ftruncate(2) also appeared in 4.2BSD along with truncate(2).
  (Or at least the manpage for both appeared in 4.2, I did not check the
  kernel code itself to see if either predated 4.2.)

PR: 199472

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

8 years agoMFC 282416:
jhb [Tue, 2 Jun 2015 15:09:33 +0000 (15:09 +0000)]
MFC 282416:
Partially revert r255486, the first argument to socketpair() is a socket
domain, not a file descriptor.  Use 'domain' instead of the original 'd'
for this argument to match socket(2).

PR: 199491

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

8 years agoMFC 282552:
jhb [Tue, 2 Jun 2015 15:07:06 +0000 (15:07 +0000)]
MFC 282552:
Remove the note about seekdir() removing telldir() cookies.  That was
removed back in r269204.

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

8 years agoMFC 281170:
jhb [Tue, 2 Jun 2015 15:02:28 +0000 (15:02 +0000)]
MFC 281170:
vfork() first appeared in 3BSD which pre-dates 2.9BSD.  Verified via the
copy of 3BSD on disc 1 of "The CSRG Archives".

PR: 198612

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

8 years agoMFC 281601:
jhb [Tue, 2 Jun 2015 14:55:55 +0000 (14:55 +0000)]
MFC 281601:
Remove THRMISC_VERSION.  The thrmisc structure doesn't include a version
number, so this wasn't used (and can't easily be added).  If at some point
we want to extend thrmisc, we will probably need to just add a new note
type and ensure that the new type includes a version number.

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

8 years agoMFC 281266:
jhb [Tue, 2 Jun 2015 14:54:53 +0000 (14:54 +0000)]
MFC 281266:
Move the 32-bit compatible procfs types from freebsd32.h to <sys/procfs.h>
and export them to userland.
- Define __HAVE_REG32 on platforms that define a reg32 structure and check
  for this in <sys/procfs.h> to control when to export prstatus32, etc.
- Add prstatus32_t and prpsinfo32_t typedefs for the 32-bit structures.
  libbfd looks for these types, and having them fixes 'gcore' in gdb of a
  32-bit process on a 64-bit platform.
- Use the structure definitions from <sys/procfs.h> in gcore's elf32 core
  dump code instead of duplicating the definitions.

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

8 years agoMFC 269128:
jhb [Tue, 2 Jun 2015 13:07:22 +0000 (13:07 +0000)]
MFC 269128:
Create 32-bit core files for 32-bit processes on 64-bit machines.
The 64-bit machine supported right now is amd64, but it's not too
hard to add powerpc64.

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

8 years agoMFC r283406,283418:
tijl [Tue, 2 Jun 2015 09:42:00 +0000 (09:42 +0000)]
MFC r283406,283418:

Fix decoding of UTF-7 when a base64 encoded chunk appears at the end of
the input buffer.

_citrus_UTF7_mbtoutf16 stored the decoder state at the beginning so it
could restore this state on an incomplete character such that the next
call would restart the decoding.  The problem was that "-" (end of base64
mode) at the end of a string was also treated as an incomplete character
but was also removed from the state buffer.  So the initial state would be
restored (with base64 mode) and the next call would no longer see the "-"
so it continued in base64 mode.

This state saving/restoring isn't needed here.  It's already handled
elsewhere (citrus_iconv_std.c:_citrus_iconv_std_iconv_convert) so just
remove it.

Also initialise *nresult.

When only 2 bytes can be read from a 4 byte UTF-16 character in a base64
encoded chunk of a UTF-7 string, treat that as an incomplete character and
return an error instead of a shift sequence and no error.

Also check that the low 2 bytes have a valid value.

PR: 200398

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

8 years agoMFC: r282866
hiren [Tue, 2 Jun 2015 08:03:28 +0000 (08:03 +0000)]
MFC: r282866

Fix pmcstat symbol resolution for userland processes.

When examining existing processes pmcstat fails to
correctly determine the locations of executable sections
of the process due to a miscalculated virtual load address.
This does not affect the newly launched processes as the
same value passed as a "start address" to the pmcstat_image_link()
thus nullifying the effect of it.  The issue manifests itself
in processes not being reported in the pmcstat(8) output and
"dubious frames" being reported.

Fix it for now by ignoring all the sections except the executable
one.  This won't fix the issue for objects with multiple
executable sections but helps in majority of real world usecases.
The real solution would be to modify the MAP-IN event to include
the appropriate load address so pmcstat(8) won't have to manually
parse object files to try to determine it.

PR: 198147, 198148
Submitted by: stas

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

9 years agoMFC r283101:
ae [Tue, 2 Jun 2015 03:51:33 +0000 (03:51 +0000)]
MFC r283101:
  Teach key_expire() send SADB_EXPIRE message with the SADB_EXT_LIFETIME_HARD
  extension header type. The key_flush_sad() now will send SADB_EXPIRE
  message when HARD lifetime expires. This is required by RFC 2367 and some
  keying daemons rely on these messages. HARD lifetime messages have
  precedence over SOFT lifetime messages, so now they will be checked first.
  Also now SADB_EXPIRE messages will be send even the SA has not been used,
  because keying daemons might want to rekey such SA.

  PR: 200282, 200283

MFC r283102:
  Change SA's state before sending SADB_EXPIRE message. This state will
  be reported to keying daemon.

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

9 years agoMFC r275390:
ae [Tue, 2 Jun 2015 03:43:36 +0000 (03:43 +0000)]
MFC r275390:
  Remove unused declartations.

MFC r275437:
  ANSIfy function declarations.

MFC r275438:
  Remove __P() macro.

Sponsored by: Yandex LLC

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

9 years agoMFC r275392:
ae [Tue, 2 Jun 2015 03:14:42 +0000 (03:14 +0000)]
MFC r275392:
  Remove route chaching support from ipsec code. It isn't used for some time.
  * remove sa_route_union declaration and route_cache member from struct secashead;
  * remove key_sa_routechange() call from ICMP and ICMPv6 code;
  * simplify ip_ipsec_mtu();
  * remove #include <net/route.h>;

Sponsored by: Yandex LLC

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

9 years agoMFC r283104:
ae [Tue, 2 Jun 2015 02:05:32 +0000 (02:05 +0000)]
MFC r283104:
  Read GEOM_UNCOMPRESS metadata using several requests that fit into
  MAXPHYS. For large compressed images the metadata size can be bigger
  than MAXPHYS and this triggers KASSERT in g_read_data().
  Also use g_free() to free memory allocated by g_read_data().

  PR: 199476

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

9 years agoMFC r283577:
ae [Tue, 2 Jun 2015 01:55:54 +0000 (01:55 +0000)]
MFC r283577:
  Print leading zeroes of UFS2 fs_id like we do for UFS1.

PR: 156908

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

9 years agoMFC: r283261
jkim [Mon, 1 Jun 2015 19:26:24 +0000 (19:26 +0000)]
MFC: r283261

Do not probe Intel PIIX4 south bridge quirks on amd64.

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

9 years agoMFC 283123:
jhb [Mon, 1 Jun 2015 18:08:56 +0000 (18:08 +0000)]
MFC 283123:
Fix two bugs that could result in PMC sampling effectively stopping.
In both cases, the the effect of the bug was that a very small positive
number was written to the counter. This means that a large number of
events needed to occur before the next sampling interrupt would trigger.
Even with very frequently occurring events like clock cycles wrapping all
the way around could take a long time. Both bugs occurred when updating
the saved reload count for an outgoing thread on a context switch.

First, the counter-independent code compares the current reload count
against the count set when the thread switched in and generates a delta
to apply to the saved count. If this delta causes the reload counter
to go negative, it would add a full reload interval to wrap it around to
a positive value. The fix is to add the full reload interval if the
resulting counter is zero.

Second, occasionally the raw counter value read during a context switch
has actually wrapped, but an interrupt has not yet triggered. In this
case the existing logic would return a very large reload count (e.g.
2^48 - 2 if the counter had overflowed by a count of 2). This was seen
both for fixed-function and programmable counters on an E5-2643.
Workaround this case by returning a reload count of zero.

PR: 198149
Sponsored by: Norse Corp, Inc.

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

9 years agoMFC 282643:
jhb [Mon, 1 Jun 2015 18:05:30 +0000 (18:05 +0000)]
MFC 282643:
Use the kern.bootfile sysctl to set the default kernel path rather than
hardcoding /boot/kernel. This allows pmcstat(8) to work without -k when
using nextboot -k or 'boot foo' at the loader to boot alternate kernels.

Sponsored by: Norse Corp, Inc.

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

9 years agoMFC 282641,282658:
jhb [Mon, 1 Jun 2015 17:57:05 +0000 (17:57 +0000)]
MFC 282641,282658:
- Move hwpmc(4) debugging code under a new HWPMC_DEBUG option instead of
  the broader DEBUG option.
- Convert hwpmc(4) debug printfs over to KTR.

Sponsored by: Norse Corp, Inc.

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

9 years agoMFC r283673, r283674:
gjb [Mon, 1 Jun 2015 16:46:51 +0000 (16:46 +0000)]
MFC r283673, r283674:

 r283673:
  Sort configuration options for consistency with other boards.

 r283674:
  Export 'BOARDNAME' when differs from the KERNCONF.

Sponsored by: The FreeBSD Foundation

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

9 years agoMFC r282208:
smh [Mon, 1 Jun 2015 09:04:57 +0000 (09:04 +0000)]
MFC r282208:
Standardise chmod, chflags, chown and chgrp recursive symlink processing

Relnotes: Yes
Sponsored by: Multiplay

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

9 years agoMFC r283515:
kib [Mon, 1 Jun 2015 06:56:49 +0000 (06:56 +0000)]
MFC r283515:
Remove excess Giant acquisition around the dounmount() call.

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

9 years agoMFC SVN mergeinfo for revisions 263638,263768 (reduce eligible merges):
dteske [Mon, 1 Jun 2015 01:54:21 +0000 (01:54 +0000)]
MFC SVN mergeinfo for revisions 263638,263768 (reduce eligible merges):
r263638: Create a root dataset (bdrewery)
r263768: Revert the above (bdrewery)

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

9 years agoMFC SVN revisions 280310-280311,281160,281167,282443,283023,283288:
dteske [Mon, 1 Jun 2015 01:50:09 +0000 (01:50 +0000)]
MFC SVN revisions 280310-280311,281160,281167,282443,283023,283288:
r280310: Whitespace cleanup(s)
r280311: Update copyright(s)
r281160: [mergeinfo only] Fix root encryption key permissions (see r281230)
r281167: [mergeinfo only] Unbreak ZFS+GELI install option (see r281230)
r282443: Add swap size sanity check (allanjude)
r283023: Skip adding swap to fstab(5) if unused (allanjude)
r283288: Fix a syntax error (allanjude)

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

9 years agoMFC SVN revisions 280234-280235:
dteske [Mon, 1 Jun 2015 01:31:50 +0000 (01:31 +0000)]
MFC SVN revisions 280234-280235:
r280234: Fix the handbook install option in bsdinstall (allanjude)
r280235: Fixup to previous (allanjude)

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

9 years agoMFC SVN revisions 272278,272379,275874:
dteske [Mon, 1 Jun 2015 01:06:33 +0000 (01:06 +0000)]
MFC SVN revisions 272278,272379,275874:
r272278: Prevent buffer overflow(s) + style(9) nits
r272379: Optimize program performance + style(9) nits
r275874: Improve feedback to user by using dpv(3)

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

9 years agoMFC r280921: Fix typo in a comment.
dteske [Mon, 1 Jun 2015 00:09:21 +0000 (00:09 +0000)]
MFC r280921: Fix typo in a comment.

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

9 years agoMFC r273480, r273750, r273753, r273797, and r274461.
np [Sun, 31 May 2015 23:47:08 +0000 (23:47 +0000)]
MFC r273480, r273750, r273753, r273797, and r274461.

r273480:
cxgbe/iw_cxgbe: wake up waiters after flushing the qp.

r273750:
Some cxgbe/iw_cxgbe fixes:
- Free rt in c4iw_connect only if it is allocated.
- Call soclose instead of so_shutdown if there is an abort from the peer.
- Close socket and return failure if TOE is not enabled.

r273753:
iwcm_event status needs to be populated for close_complete_upcall

r273797:
Always request a completion for every work request for iWARP.  The
initial MPA exchange must be tracked this way so that t4_tom's state for
the tid is all clean at the time the tid transitions to RDMA mode.  Once
it does, t4_tom is out of the way and iw_cxgbe uses the qp endpoints
directly.

r274461:
iw_cxgbe: don't forget to close the socket in c4iw_connect if soconnect
fails.

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

9 years agoMFC r283313:
ae [Sun, 31 May 2015 23:29:04 +0000 (23:29 +0000)]
MFC r283313:
  Properly update TX statistics for wlan(4).
  ieee80211_pwrsave() can fail due to queue overflow, check its return code
  and increment oerrors counter when it fails. Also handle more error cases
  and update oerrors counter when we don't send mbuf due to some errors.
  Return ENETDOWN when parent interface isn't ready. Update obytes and omcasts
  counters in corresponding places.

PR: 184626
Differential Revision: https://reviews.freebsd.org/D2621

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

9 years agoMFC r272719:
np [Sun, 31 May 2015 23:11:25 +0000 (23:11 +0000)]
MFC r272719:

cxgbe/tom: don't leak resources tied to an active open request that
cannot be sent to the chip because a prerequisite L2 resolution
failed.

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

9 years agoMFC r283147:
ngie [Sun, 31 May 2015 23:00:35 +0000 (23:00 +0000)]
MFC r283147:

Build cddl/{sbin,usr.bin,usr.sbin} in parallel as all of the applications are
freestanding (they require libraries build via make libraries in buildworld)

Sponsored by: EMC / Isilon Storage Division

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

9 years agoMFC r282965:
ae [Sun, 31 May 2015 22:58:41 +0000 (22:58 +0000)]
MFC r282965:
  Add an ability accept encapsulated packets from different sources by one
  gif(4) interface. Add new option "ignore_source" for gif(4) interface.
  When it is enabled, gif's encapcheck function requires match only for
  packet's destination address.

  Differential Revision: https://reviews.freebsd.org/D2004
  Sponsored by: Yandex LLC

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

9 years agoMFC r283357:
ngie [Sun, 31 May 2015 22:56:03 +0000 (22:56 +0000)]
MFC r283357:

Remove directory for test that has been integrated in under tests/sys/...

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

9 years agoMFC r283117:
ae [Sun, 31 May 2015 22:49:32 +0000 (22:49 +0000)]
MFC r283117:
  Remove unneded mbuf length adjustment, M_PREPEND() already did that.

PR: 139387

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

9 years agoMFC r283170:
ngie [Sun, 31 May 2015 22:44:14 +0000 (22:44 +0000)]
MFC r283170:

Import proposed fix from upstream for
atf-sh/atf_check_test:flush_stdout_on_timeout

Many thanks for jmmv for the fix!

PR: 197060

Original commit message:

From 0e546407567ea858e261e72f75c5ed61e07d0ddf Mon Sep 17 00:00:00 2001
From: Julio Merino <jmmv@google.com>
Date: Tue, 17 Feb 2015 18:10:11 -0500
Subject: [PATCH] Fix atf-sh/atf_check_test:flush_stdout_on_death

The test atf-sh/atf_check_test:flush_stdout_on_timeout was flaky as it
was playing solely with time.  Fix this by making the test more robust
and rename it while we are at it: there is nothing left about "timeouts"
in this test, considering that ATF itself does not enforce deadlines
any longer.

Fixes FreeBSD PR 197060.

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

9 years agoMFC r283502:
ngie [Sun, 31 May 2015 22:41:22 +0000 (22:41 +0000)]
MFC r283502:

Remove SUBDIR_DEPEND for non-existent libreadline directory

libreadline lives under gnu/lib

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

9 years agoMFC r277627,r277650,r282059,r283056,r283840,r283845:
ngie [Sun, 31 May 2015 22:39:48 +0000 (22:39 +0000)]
MFC r277627,r277650,r282059,r283056,r283840,r283845:

r277627 (by will):

Add routing_test:static_ipv6_loopback_route_for_each_fib.
It tests that all FIBs get a static IPv6 loopback route.

Submitted by: asomers
Sponsored by: Spectra Logic
MFSpectraBSD: 1048456 on 2014/03/13
1114523 on 2015/01/23

r277650 (by will):

Add tests/etc/rc.d to mtree.

Submitted by: stefanf
MFC with: 277627

r282059:

Move etc/tests/rc.d to etc/rc.d/tests to match the directory layout jmmv@
documented and implemented in other areas of the FreeBSD tree

r283056:

Move all test integration pieces for etc/ from etc/ to tests/

This is being done to fix breakage with make distribution with read-only
source trees as make distribution doesn't use make obj like building
tests/ does in all cases

Reported by: Wolfgang Zenker <wolfgang@lyxys.ka.sub.org>
Suggested by: jhb

r283840:

Remove empty tests directory

r283845:

Append to SUBDIR, not set it

Pointyhat to: ngie

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

9 years agoMFC r283691:
tuexen [Sun, 31 May 2015 13:07:22 +0000 (13:07 +0000)]
MFC r283691:

Remove printf() noise...

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

9 years agoMFC r283666:
tuexen [Sun, 31 May 2015 13:04:38 +0000 (13:04 +0000)]
MFC r283666:

Report the MTU consistently as specified in
https://tools.ietf.org/html/rfc6458
Thanks to Irene Ruengeler for helping me to fix this bug.

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

9 years agoMFC r283665:
tuexen [Sun, 31 May 2015 13:01:58 +0000 (13:01 +0000)]
MFC r283665:

Take source and destination address into account when determining
the scope.
This fixes a problem when a client with a global address
connects to a server with a private address.
Thanks to Irene Ruengeler in helping me to find the issue.

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

9 years agoMFC r283664:
tuexen [Sun, 31 May 2015 12:59:22 +0000 (12:59 +0000)]
MFC r283664:

Retire SCTP_DONT_DO_PRIVADDR_SCOPE which was never defined.

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

9 years agoMFC r283662:
tuexen [Sun, 31 May 2015 12:56:22 +0000 (12:56 +0000)]
MFC r283662:

Fix a bug where messages would not be sent in SHUTDOWN_RECEIVED state.
This problem was reported by Mark Bonnekessel and Markus Boese.
Thanks to Irene Ruengeler for helping me to fix the cause of
the problem. It can be tested with the following packetdrill script:

+0.0 socket(..., SOCK_STREAM, IPPROTO_SCTP) = 3
+0.0 fcntl(3, F_GETFL) = 0x2 (flags O_RDWR)
+0.0 fcntl(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0
// Check the handshake with an empty(!) cookie
+0.1 connect(3, ..., ...) = -1 EINPROGRESS (Operation now in progress)
+0.0 > sctp: INIT[flgs=0, tag=1, a_rwnd=..., os=..., is=..., tsn=0, ...]
+0.1 < sctp: INIT_ACK[flgs=0, tag=2, a_rwnd=10000, os=1, is=1, tsn=0, STATE_COOKIE[len=4, val=...]]
+0.0 > sctp: COOKIE_ECHO[flgs=0, len=4, val=...]
+0.1 < sctp: COOKIE_ACK[flgs=0]
+0.0 getsockopt(3, SOL_SOCKET, SO_ERROR, [0], [4]) = 0
+0.0 write(3, ..., 1024) = 1024
+0.0 > sctp: DATA[flgs=BE, len=1040, tsn=0, sid=0, ssn=0, ppid=0]
+0.0 write(3, ..., 1024) = 1024 // Pending due to Nagle
+0.0 < sctp: SHUTDOWN[flgs=0, cum_tsn=0]
+0.0 > sctp: DATA[flgs=BE, len=1040, tsn=1, sid=0, ssn=1, ppid=0]
+0.0 < sctp: SACK[flgs=0, cum_tsn=1, a_rwnd=10000, gaps=[], dups=[]] // Do we need another SHUTDOWN here?
+0.0 > sctp: SHUTDOWN_ACK[flgs=0]
+0.0 < sctp: SHUTDOWN_COMPLETE[flgs=0]
+0.0 close(3) = 0

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

9 years agoMFC r283658:
tuexen [Sun, 31 May 2015 12:53:16 +0000 (12:53 +0000)]
MFC r283658:

Use macros for overhead in a consistent way. No functional change.
Thanks to Irene Ruengeler for suggesting the change.

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

9 years agoMFC r283654:
tuexen [Sun, 31 May 2015 12:50:10 +0000 (12:50 +0000)]
MFC r283654:

Some more debug info cleanup.

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

9 years agoMFC r283650:
tuexen [Sun, 31 May 2015 12:46:40 +0000 (12:46 +0000)]
MFC r283650:

Fix and cleanup the debug information. This has no user-visible changes.
Thanks to Irene Ruengeler for proving a patch.

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

9 years agoMFC r283648:
tuexen [Sun, 31 May 2015 12:42:34 +0000 (12:42 +0000)]
MFC r283648:

Address some compiler warnings. No functional change.

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

9 years agoMFC: r283695
bapt [Sun, 31 May 2015 00:52:45 +0000 (00:52 +0000)]
MFC: r283695

Remove dead declaration

PR: 195928

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

9 years agoMFC: r281039
bapt [Sat, 30 May 2015 21:49:18 +0000 (21:49 +0000)]
MFC: r281039

Allow fetching pkg(8) even if servers/proxies are not passing Content-length

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

9 years agoMFC: r273778 (by nwhitehorn)
bapt [Sat, 30 May 2015 21:47:25 +0000 (21:47 +0000)]
MFC: r273778 (by nwhitehorn)

Remove spurious libelf dependency.

Submitted by: pluknet

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

9 years agoMFC: r273754 (by nwhitehorn)
bapt [Sat, 30 May 2015 21:45:46 +0000 (21:45 +0000)]
MFC: r273754 (by nwhitehorn)

Use pkg-1.4-style platform identifiers based on MACHINE_ARCH (e.g.
FreeBSD:11:amd64 instead of freebsd:11:x86:64) when bootstrapping pkg.
Thanks to portmgr for providing symlinks so both styles work.

Reviewed by: bapt
MFC after: 3 weeks

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

9 years agoMFC: r259773, r259774, r259775
bapt [Sat, 30 May 2015 21:32:02 +0000 (21:32 +0000)]
MFC: r259773, r259774, r259775

Do not print a question in non-interractive mode but explain why boostrapping
has failed and how to allow it to happen

Reported by: jmmv

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

9 years agoMFC: r258226
bapt [Sat, 30 May 2015 21:28:55 +0000 (21:28 +0000)]
MFC: r258226

argc is now used

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

9 years agoMFC: r258020 (by bdrewery)
bapt [Sat, 30 May 2015 21:25:32 +0000 (21:25 +0000)]
MFC: r258020 (by bdrewery)

Remove useless checks for NULL pointer before free(3)

Reported by: eadler
Approved by: eadler

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

9 years agoMFC: r257701 (by bdrewery)
bapt [Sat, 30 May 2015 21:23:41 +0000 (21:23 +0000)]
MFC: r257701 (by bdrewery)

Remove condition which can never be true as the previous loop
is never exited while remote == NULL.

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

9 years agoMFC r283320:
kib [Sat, 30 May 2015 08:54:42 +0000 (08:54 +0000)]
MFC r283320:
Always obey thread request to not stop on non-boundary.

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

9 years agoMFC: r283008
rmacklem [Sat, 30 May 2015 01:04:45 +0000 (01:04 +0000)]
MFC: r283008
Add a warning message to mountd for exported file
systems that are automounted, since that configuration
isn't supported. This still allows the export, since
two emails I received felt that this should not be
disabled. It sends the message to syslog(LOG_ERR..), so that
it goes to the same places as the other messages related
to /etc/exports problems, even though it is a warning and not an error.

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

9 years agoMFC r281236 -- extended media types in if_media.h.
erj [Fri, 29 May 2015 23:02:12 +0000 (23:02 +0000)]
MFC r281236 -- extended media types in if_media.h.

Approved by: jfv (mentor)

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

9 years agoMFC r283274
davidcs [Fri, 29 May 2015 21:30:11 +0000 (21:30 +0000)]
MFC r283274

Submitted by: gary.zambrano@qlogic.com
Approved by:davidcs@freebsd.org

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

9 years agoMFC r283269
davidcs [Fri, 29 May 2015 20:00:02 +0000 (20:00 +0000)]
MFC r283269

Submitted by:gary.zambrano@qlogic.com
Approved by:davidcs@freebsd.org

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

9 years agoMFC r283295: ipf(1): Use strchr(3) instead of deprecated index(3)
emaste [Fri, 29 May 2015 17:43:14 +0000 (17:43 +0000)]
MFC r283295: ipf(1): Use strchr(3) instead of deprecated index(3)

Sponsored by: The FreeBSD Foundation

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

9 years agoMFC r282810:
tuexen [Fri, 29 May 2015 13:37:04 +0000 (13:37 +0000)]
MFC r282810:

Ensure that the COOKIE-ACK can be sent over UDP if the COOKIE-ECHO was
received over UDP.
Thanks to Felix Weinrank for makeing me aware of the problem and to
Irene Ruengeler for providing the fix.

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

9 years agoMFC r282042:
tuexen [Fri, 29 May 2015 13:34:31 +0000 (13:34 +0000)]
MFC r282042:

Don't panic under INVARIANTS when receiving a SACK which cumacks
a TSN never sent.
While there, fix two typos.

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

9 years agoMFC r281884:
tuexen [Fri, 29 May 2015 13:32:08 +0000 (13:32 +0000)]
MFC r281884:

A complete user message is signalled with the MSG_EOR flag, not the MSG_EOF
flag.
Thanks to Valentin Nechayev for reporting the issue.

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

9 years agoMFC r281202:
tuexen [Fri, 29 May 2015 13:30:37 +0000 (13:30 +0000)]
MFC r281202:

The code says "or", not "either or". So fix the documentation.

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

9 years agoMFC r280782:
tuexen [Fri, 29 May 2015 13:28:24 +0000 (13:28 +0000)]
MFC r280782:

Add an SCTP symbol which was missed in
https://svnweb.freebsd.org/base?view=revision&revision=169622
This fixes
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=197783
Thanks to Jukka Ukkonen for reporting the bug and providing a fix.

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

9 years agoMFC r280714:
tuexen [Fri, 29 May 2015 13:26:05 +0000 (13:26 +0000)]
MFC r280714:

Improve the selection of the destination address of SACK chunks.
This fixes
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=196755
and is joint work with rrs@.

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

9 years agoMFC r280642:
tuexen [Fri, 29 May 2015 13:23:16 +0000 (13:23 +0000)]
MFC r280642:

Make sure that we don't free an SCTP shared key too early.
Thanks to Pouyan Sepehrdad from Qualcomm Product Security Initiative
for reporting the issue.

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

9 years agoMFC r280634:
tuexen [Fri, 29 May 2015 13:20:39 +0000 (13:20 +0000)]
MFC r280634:

Use the reference count of the right SCTP inp.
Joint work with rrs@

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

9 years agoMFC r280459:
tuexen [Fri, 29 May 2015 13:18:10 +0000 (13:18 +0000)]
MFC r280459:

Fix two bugs which resulted in a screwed up end point list:
* Use a save way to walk throught a list while manipulting it.
* Have to appropiate locks in place.
Joint work with rrs@

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

9 years agoMFC r280440:
tuexen [Fri, 29 May 2015 13:13:12 +0000 (13:13 +0000)]
MFC r280440:

Fix the bug in the handling of fragmented abandoned SCTP user messages reported in
https://code.google.com/p/sctp-refimpl/issues/detail?id=11
Thanks to Lally Singh for reporting it.

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

9 years agoMFC r280439:
tuexen [Fri, 29 May 2015 13:11:13 +0000 (13:11 +0000)]
MFC r280439:

Fix an accounting bug related to the per stream chunk counter.
While there, don't refer to a net articifically.

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

9 years agoMFC r280404:
tuexen [Fri, 29 May 2015 13:08:43 +0000 (13:08 +0000)]
MFC r280404:

When an ICMP message is received and the MTU shrinks, only
mark outstanding chunks for retransmissions.

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

9 years agoMFC r280371:
tuexen [Fri, 29 May 2015 13:06:15 +0000 (13:06 +0000)]
MFC r280371:

Remove a useless assignment.

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