]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/log
FreeBSD/stable/10.git
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

8 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

8 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

8 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

8 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

8 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

8 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

8 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

8 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

8 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

8 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

8 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

9 years agoMFC r279886:
tuexen [Fri, 29 May 2015 13:02:00 +0000 (13:02 +0000)]
MFC r279886:

Fix the adaptation of the path state when thresholds are changed
using the SCTP_PEER_ADDR_THLDS socket option.

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

9 years agoMFC r279867:
tuexen [Fri, 29 May 2015 12:59:18 +0000 (12:59 +0000)]
MFC r279867:

Keep track on the socket lock state. This fixes a bug showing up on
Mac OS X.

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

9 years agoMFC r279863:
tuexen [Fri, 29 May 2015 12:57:04 +0000 (12:57 +0000)]
MFC r279863:

Unlock the stcb when using setsockopt() for the SCTP_PEER_ADDR_THLDS option.

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

9 years agoMFC r279859:
tuexen [Fri, 29 May 2015 12:54:30 +0000 (12:54 +0000)]
MFC r279859:

Add a SCTP socket option to limit the cwnd for each path.

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

9 years agoMFC r279841:
tuexen [Fri, 29 May 2015 12:50:53 +0000 (12:50 +0000)]
MFC r279841:

Fix a typo.

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

9 years agoMFC r277815:
tuexen [Fri, 29 May 2015 12:48:14 +0000 (12:48 +0000)]
MFC r277815:

Whitespace change.

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

9 years agoMFC r277424:
tuexen [Fri, 29 May 2015 12:45:55 +0000 (12:45 +0000)]
MFC r277424:

Remove comparisons which are not necessary.
With manual intervention.

Reported by: Coverity
CID: 123782612378441237847

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

9 years agoMFC r277380:
tuexen [Fri, 29 May 2015 12:35:21 +0000 (12:35 +0000)]
MFC r277380:

Code cleanup.

Reported by: Coverity
CID: 749578

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

9 years agoMFC r277350:
tuexen [Fri, 29 May 2015 12:33:02 +0000 (12:33 +0000)]
MFC r277350:

Fix a bug which only shows up when an mbuf allocation failed.
Therefore chances are low that we hit this.

Reported by: Coverity
CID: 1018886

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

9 years agoMFC r277348:
tuexen [Fri, 29 May 2015 12:30:19 +0000 (12:30 +0000)]
MFC r277348:

Remove an unnecessary check.

Reported by: Coverity
CID: 749576

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

9 years agoMFC r277347:
tuexen [Fri, 29 May 2015 12:27:45 +0000 (12:27 +0000)]
MFC r277347:

Add protection code to free memory in case of processing an address which
is neither IPv4 or IPv6.

Reported by: Coverity
CID: 749311

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

9 years agoMFC r277337:
tuexen [Fri, 29 May 2015 12:25:11 +0000 (12:25 +0000)]
MFC r277337:

Remove an unused variable.

Reported by: Coverity
CID: 750999

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

9 years agoMFC r277053:
tuexen [Fri, 29 May 2015 12:22:35 +0000 (12:22 +0000)]
MFC r277053:

Remove dead code.

Reported by: Coverity
CID: 748664

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

9 years agoMFC r277049:
tuexen [Fri, 29 May 2015 12:19:41 +0000 (12:19 +0000)]
MFC r277049:

Remove dead code.

Reported by: Coverity
CID: 1018052

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

9 years agoMFC r277046:
tuexen [Fri, 29 May 2015 12:17:21 +0000 (12:17 +0000)]
MFC r277046:

Remove dead code.

Reported by: Coverity
CID: 1018053

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

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

Remove dead code.

Reported by: Coverity
CID: 748663

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

9 years agoMFC r277033:
tuexen [Fri, 29 May 2015 12:11:14 +0000 (12:11 +0000)]
MFC r277033:

Remove dead code.

Reported by: Coverity
CID: 748660, 748661

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

9 years agoMFC r277031
tuexen [Fri, 29 May 2015 12:08:49 +0000 (12:08 +0000)]
MFC r277031

Remove dead code.

Reported by: Coverity
CID: 748665

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

9 years agoMFC r277030:
tuexen [Fri, 29 May 2015 12:06:00 +0000 (12:06 +0000)]
MFC r277030:

Remove dead code.

Reported by: Coverity
CID: 748666

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

9 years agoMFC r276914:
tuexen [Fri, 29 May 2015 12:03:02 +0000 (12:03 +0000)]
MFC r276914:

Minimize the usage of SCTP_BUF_IS_EXTENDED.
This should help Robert...

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

9 years agoMFC r276009:
tuexen [Fri, 29 May 2015 11:52:32 +0000 (11:52 +0000)]
MFC r276009:

Don't check twice that inp is not NULL.

Reported by: Coverity
CID: 748671

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

9 years agoMFC r275967:
tuexen [Fri, 29 May 2015 11:47:54 +0000 (11:47 +0000)]
MFC r275967:

Fix and harmonize the validation of PR-SCTP policies.

Reported by: Coverity
CID: 1232044

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

9 years agoMFC r275954:
tuexen [Fri, 29 May 2015 11:43:51 +0000 (11:43 +0000)]
MFC r275954:

Cleanup the code.

Reported by: Coverity
CID: 1232003

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

9 years agoMFC r275869:
tuexen [Fri, 29 May 2015 11:40:50 +0000 (11:40 +0000)]
MFC r275869:

Add a missing break.

Reported by: Coverity
CID: 1232014

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

9 years agoMFC r275868:
tuexen [Fri, 29 May 2015 11:25:38 +0000 (11:25 +0000)]
MFC r275868:

Plug a memory leak in an error code path.

Reported by: Coverity
CID: 1018936

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

9 years agoMFC r275857:
tuexen [Fri, 29 May 2015 11:21:34 +0000 (11:21 +0000)]
MFC r275857:

Initilize the msg_flags field consistently in all code paths.

Reported by: Coverity
CID: 1018726

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

9 years agoMFC r275682:
tuexen [Fri, 29 May 2015 11:19:30 +0000 (11:19 +0000)]
MFC r275682:

Fix a typo reported by Lennart Grahl.

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

9 years agoMFC r275574:
tuexen [Fri, 29 May 2015 11:18:06 +0000 (11:18 +0000)]
MFC r275574:

Include the received chunk padding when reporting an unknown chunk.

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

9 years agoMFC r275567:
tuexen [Fri, 29 May 2015 11:15:00 +0000 (11:15 +0000)]
MFC r275567:

Fix the support of mapped IPv4 addresses.
Thanks to Mark Bonnekessel and Markus Boese for making me aware of the
problems.

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

9 years agoMFC r273925:
tuexen [Fri, 29 May 2015 11:04:55 +0000 (11:04 +0000)]
MFC r273925:

Don't zero the stats before they are read out.

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

9 years agoMFC r273634:
tuexen [Fri, 29 May 2015 11:01:46 +0000 (11:01 +0000)]
MFC r273634:

Fix a use of an uninitialized variable by makeing sure
that sctp_med_chunk_output() always initialized the reason_code
instead of relying on the caller.
The variable is only used for debugging purpose.
This issue was reported by Peter Bostroem from Google.

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

9 years agoMFC r282948:
kib [Fri, 29 May 2015 07:48:30 +0000 (07:48 +0000)]
MFC r282948:
Use bare mmap(2) to allocate space for the per-thread keys,
instead of malloc(). This allows third party mallocs, which use
pthread_setspecific(3) on the allocation path, to work.

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

9 years agoMFC: r283599
arybchik [Fri, 29 May 2015 05:58:21 +0000 (05:58 +0000)]
MFC: r283599

sfxge: mask ifmedia options (pauses) when looking for matching mode

Sponsored by:   Solarflare Communications, Inc.

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

9 years agoMFC r277915:
markj [Fri, 29 May 2015 04:22:57 +0000 (04:22 +0000)]
MFC r277915:
Don't attempt to disable enabled fasttrap probes in an exiting process.

MFC r277914:
fasttrap_sigtrap(): use tdsendsignal() to send SIGTRAP.

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

9 years agoMFC r281915:
markj [Fri, 29 May 2015 04:01:39 +0000 (04:01 +0000)]
MFC r281915:
Make vpanic() externally visible.

MFC r281916:
Fix DTrace's panic() action.

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