]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/log
FreeBSD/stable/8.git
12 years agoMFC r231079:
dim [Mon, 13 Feb 2012 20:59:58 +0000 (20:59 +0000)]
MFC r231079:

  Let rpcgen(1) support an environment variable RPCGEN_CPP to find the C
  preprocessor to run.  Previously, it always ran /usr/bin/cpp, unless you
  used the -Y option, and even then you could not set the basename.  It
  also attempted to run /usr/ccs/lib/cpp for SVR4 compatibility, but this
  is obsolete, and has been removed.

  Note that setting RPCGEN_CPP to a command with arguments is supported,
  though the command line parsing is simplistic.  However, setting it to
  e.g. "gcc46 -E" or "clang -E" will lead to problems, because both gcc
  and clang in -E mode will consider files with unknown extensions (such
  as .x) as object files, and attempt to link them.

  This could be worked around by also adding "-x c", but it is much safer
  to set RPCGEN_CPP to e.g. "cpp46" or "clang-cpp" instead.

MFC r231080:

  Amend r231079 by properly shifting up the existing arguments in
  rpc_main.c's insarg() function.  I had forgotten to put this in my patch
  queue, sorry.

  Pointy hat to: me

MFC r231101:

  In usr.bin/rpcgen/rpc_main.c, use execvp(3) instead of execv(3), so
  rpcgen will search the current PATH for the preprocessor.  This makes it
  possible to run a preprocessor built during the cross-tools stage of
  buildworld.

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

12 years agoMFC 230340:
jhb [Mon, 13 Feb 2012 19:52:18 +0000 (19:52 +0000)]
MFC 230340:
Properly return success once a matching VPD entry is found in
pci_get_vpd_readonly_method().  Previously the loop was always running
to completion and falling through to failing with ENXIO.

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

12 years agoMFC 230332:
jhb [Mon, 13 Feb 2012 19:49:45 +0000 (19:49 +0000)]
MFC 230332:
Add support for the Em command.  This restores a missing 'not' in the
description of snd_emu10kx(4).

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

12 years agoMFC r231592:
np [Mon, 13 Feb 2012 19:41:31 +0000 (19:41 +0000)]
MFC r231592:
Use the non-sleeping variang of t4_wr_mbox in code that can be called
with locks held.

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

12 years agoMFC r231175:
np [Mon, 13 Feb 2012 19:36:00 +0000 (19:36 +0000)]
MFC r231175:
Allocate the BAR for userspace doorbells after the is_offload check
is functional.

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

12 years agoMFC r231172:
np [Mon, 13 Feb 2012 19:31:32 +0000 (19:31 +0000)]
MFC r231172:
Program the MAC exact match table in batches of 7 addresses at
a time when possible.  This is more efficient than one at a time.

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

12 years agoMFC r231120:
np [Mon, 13 Feb 2012 19:25:58 +0000 (19:25 +0000)]
MFC r231120:
Acquire the adapter lock before updating fields of the filter structure.

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

12 years agoMFC r231116:
np [Mon, 13 Feb 2012 19:18:08 +0000 (19:18 +0000)]
MFC r231116:
Remove if_start from cxgb and cxgbe.

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

12 years agoMFC r223596:
se [Mon, 13 Feb 2012 18:57:36 +0000 (18:57 +0000)]
MFC r223596:

Add macros to specify owner, group and mode of config files for installation.

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

12 years agoMFC: cross-arch support for picobsd
luigi [Mon, 13 Feb 2012 18:10:13 +0000 (18:10 +0000)]
MFC: cross-arch support for picobsd

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

12 years agoMFC: sha256 ($5$) and sha512 ($6$) crypt(3) types.
markm [Mon, 13 Feb 2012 16:43:29 +0000 (16:43 +0000)]
MFC: sha256 ($5$) and sha512 ($6$) crypt(3) types.

PR: misc/124164
Delayed by: markm

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

12 years agoMFC r228636:
tijl [Mon, 13 Feb 2012 10:24:22 +0000 (10:24 +0000)]
MFC r228636:

Correct a logic error in usr.bin/hexdump/conv.c, found by clang.

Whenever the conv_c() function encounters an incomplete multibyte char,
it peeks ahead.  It also sets p to peekbuf, to indicate it is still
processing the incomplete character.

However, on the next retry, it compares buf against peekbuf, which
always returns false, since both buf and peekbuf are local char arrays,
whose addresses are never the same.

Fix this by comparing against p instead, which was the intention.  Also
turn peekbuf into an array of u_char, to prevent conversion warnings.

MFC r229794:

- Fix how hexdump parses escape strings
From the NetBSD bug:
The way how hexdump(1) parses escape sequences has some bugs.
It shows up when an escape sequence is used as the non-last character
of a format string.

MFC r230649:

Fix decoding of escape sequences in format strings:
- Zero-terminate the resulting string by letting the for-loop copy the
  terminating zero.
- Exit the for-loop after handling a backslash at the end of the format
  string to fix a buffer overrun.
- Remove some unnecessary comments and blank lines.

PR: bin/144722

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

12 years agoMFC 231196:
brooks [Sun, 12 Feb 2012 23:12:47 +0000 (23:12 +0000)]
MFC 231196:
  eui64_aton and eui64_ntoa are actually the equivalent of ether_aton_r and
  ether_nota_r and do not use static variables so remove the note copied
  from ethers.3 saying they do.

Reported by: bms

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

12 years agoMFC r231054:
dim [Sun, 12 Feb 2012 14:56:40 +0000 (14:56 +0000)]
MFC r231054:

In usr.bin/rpcgen/rpc_main.c, properly check the return value of
strlcpy(), in addition to checking that of strlcat().

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

12 years agoMFC r231015, r231016:
trociny [Sun, 12 Feb 2012 07:59:25 +0000 (07:59 +0000)]
MFC r231015, r231016:

r231015:

Fix the regression introduced in r226859: if the local component is
out of date BIO_READ requests got lost instead of being sent to the
remote component.

Reviewed by: pjd

r231016:

If a local write request is from the synchronization thread, when it
is synchronizing data that is out of date on the local component, we
should not send G_GATE_CMD_DONE acknowledge to the kernel.

This fixes the issue, observed in async mode, when on synchronization
from the remote component the worker terminated with "G_GATE_CMD_DONE
failed" error.

Reported by: Artem Kajalainen <artem kayalaynen ru>
Reviewed by: pjd

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

12 years agoMFC r230874:
trociny [Sun, 12 Feb 2012 07:56:07 +0000 (07:56 +0000)]
MFC r230874:

Try to avoid ambiguity when sysctl returns ENOMEM additionally
checking the returned oldlen: when ENOMEM is due to the supplied
buffer being too short the return oldlen is equal to buffer size.

Without this additional check sockstat gets stuck in loop leaking the
memory if the returned ENOMEM was due the exceeded memorylocked
limit. This is easily can be observed running `limits -l 1k sockstat'.

Submitted by: Andrey Zonov <andrey zonov org>

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

12 years agoMFC r230873:
trociny [Sun, 12 Feb 2012 07:53:02 +0000 (07:53 +0000)]
MFC r230873:

Try to avoid ambiguity when sysctl returns ENOMEM additionally
checking the returned oldlen: when ENOMEM is due to the supplied
buffer being too short the return oldlen is equal to buffer size.

Without this additional check kvm_getprocs() gets stuck in loop if the
returned ENOMEM was due the exceeded memorylocked limit. This is
easily can be observed running `limits -l 1k top'.

Submitted by: Andrey Zonov <andrey zonov org>

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

12 years agoMFC: r231133
rmacklem [Sun, 12 Feb 2012 06:41:29 +0000 (06:41 +0000)]
MFC: r231133
r228827 fixed a problem where copying of NFSv4 open credentials into
a credential structure would corrupt it. This happened when the
p argument was != NULL. However, I now realize that the copying of
open credentials should only happen for p == NULL, since that indicates
that it is a read-ahead or write-behind. This patch fixes this.
After this commit, r228827 could be reverted, but I think the code is
clearer and safer with the patch, so I am going to leave it in.
Without this patch, it was possible that a NFSv4 VOP_SETATTR() could have
changed the credentials of the caller. This would have happened if
the process doing the VOP_SETATTR() did not have the file open, but
some other process running as a different uid had the file open for writing
at the same time.

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

12 years agoMFC r215615, r215642:
mckay [Sun, 12 Feb 2012 05:01:49 +0000 (05:01 +0000)]
MFC r215615, r215642:

Fix several misbehaviours by making xargs keep track of its child processes.

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

12 years agoMFC 203377-231538. This records mergeinfo for already merged
rodrigc [Sat, 11 Feb 2012 23:39:53 +0000 (23:39 +0000)]
MFC 203377-231538.  This records mergeinfo for already merged
changesets, but brings in the following changes:

MFC 222326
    - Fix tftp_log() usage

MFC 223137
    - Man page updates

MFC 223487
    - Bring back syncnet() implementation from older tftp implementation.

MFC 229780
    - Spelling fixes for libexec/

MFC 229904
    - Fix warning when compiling with gcc46:
          error: variable 'bp' set but not used

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

12 years agoMFC 196045 through 231537
rodrigc [Sat, 11 Feb 2012 23:15:14 +0000 (23:15 +0000)]
MFC 196045 through 231537
   - this records svn:mergeinfo for previously merged changesets

This pulls in changes such as:

MFC 216370
  - Remove adertising clause from UCB copyrighted files in usr.bin

MFC 222534
  - Fix a couple of spelling errors.

MFC 223493
  - Remove duplicated header files

MFC 223135 - 223491
  - man page updates

MFC 229403
  - Replace index() and rindex() calls with strchr() and strrchr().

MFC 230044
  - fgets(3) returns a pointer, so compare against NULL, not integer 0.

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

12 years agoMFC r231001: sh: Fix swapped INTON/INTOFF.
jilles [Sat, 11 Feb 2012 20:37:08 +0000 (20:37 +0000)]
MFC r231001: sh: Fix swapped INTON/INTOFF.

A possible consequence of this bug was a memory leak if SIGINT arrived
during a 'set' command (listing variables).

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

12 years agoMFC r230157: dadump: don't leak the periph lock on i/o error
avg [Sat, 11 Feb 2012 14:58:46 +0000 (14:58 +0000)]
MFC r230157: dadump: don't leak the periph lock on i/o error

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

12 years agoMFC r218264:
tuexen [Sat, 11 Feb 2012 08:58:12 +0000 (08:58 +0000)]
MFC r218264:
Fix typo (Tuneable -> Tunable).
From brucec@.

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

12 years agoMFC r231074:
tuexen [Sat, 11 Feb 2012 01:17:27 +0000 (01:17 +0000)]
MFC r231074:
Fix a typo which was already fixed by eadler in r227489. We missed
to integrate this fix in our code base, so it was removed in r227755.

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

12 years agoMFC r230555:
tuexen [Sat, 11 Feb 2012 01:15:02 +0000 (01:15 +0000)]
MFC r230555:
Don't print a warning when using netstat to print
SCTP statistics when there is not SCTP in the kernel.
This problem was reported by Sean Mahood.

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

12 years agoMFC r230379:
tuexen [Sat, 11 Feb 2012 01:13:35 +0000 (01:13 +0000)]
MFC r230379:
Fix a problem when using the CBAPI.
While there, remove an old comment which does not apply anymore.

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

12 years agoMFC r230138:
tuexen [Sat, 11 Feb 2012 01:11:37 +0000 (01:11 +0000)]
MFC r230138:
Small cleanup, no functional change.

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

12 years agoMFC r230136:
tuexen [Sat, 11 Feb 2012 01:09:46 +0000 (01:09 +0000)]
MFC r230136:
Two cleanups. No functional change.

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

12 years agoMFC r230104:
tuexen [Sat, 11 Feb 2012 01:07:51 +0000 (01:07 +0000)]
MFC r230104:
Fix two bugs, which result in a panic when calling getsockopt()
using SCTP_RECVINFO or SCTP_NXTINFO.
Reported by Clement Lecigne and forwarded to us by zi@.

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

12 years agoMFC r229805:
tuexen [Sat, 11 Feb 2012 01:05:41 +0000 (01:05 +0000)]
MFC r229805:
Add an SCTP sysctl "blackhole", similar to the one for TCP.
If set to 1, no ABORT is sent back in response to an incoming
INIT. If set to 2, no ABORT is sent back in response to
an out of the blue packet. If set to 0 (the default), ABORTs
are sent.
Discussed with rrs@.

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

12 years agoMFC r229775:
tuexen [Sat, 11 Feb 2012 01:03:17 +0000 (01:03 +0000)]
MFC r229775:
Retire the SCTP sysctl "strict_init". We always perform the validation
and there is no reason to make is configuarable.
Discussed with rrs@.

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

12 years agoMFC r229774:
tuexen [Sat, 11 Feb 2012 01:01:07 +0000 (01:01 +0000)]
MFC r229774:
Improve the handling of received INITs. Send an ABORT when
not accepting the connection. Also fix a crash, which
could happen when the user closed the socket.

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

12 years agoMFC r229729:
tuexen [Sat, 11 Feb 2012 00:59:22 +0000 (00:59 +0000)]
MFC r229729:
Use NULL instead of 0.

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

12 years agoMFC r228907:
tuexen [Sat, 11 Feb 2012 00:57:08 +0000 (00:57 +0000)]
MFC r228907:
Address issues found by clang. While there, fix also some style
issues.

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

12 years agoMFC r228653:
tuexen [Sat, 11 Feb 2012 00:54:24 +0000 (00:54 +0000)]
MFC r228653:
Fix unused parameter warnings.
While there, fix some whitespace issues.

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

12 years agoMFC r228630:
tuexen [Sat, 11 Feb 2012 00:51:26 +0000 (00:51 +0000)]
MFC r228630:
Address warnings found by clang.

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

12 years agoMFC r228531:
tuexen [Sat, 11 Feb 2012 00:49:54 +0000 (00:49 +0000)]
MFC r228531:
Fix a bug where sctp_sendmdg() uses uninitialized memory.

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

12 years agoMFC r228391:
tuexen [Sat, 11 Feb 2012 00:48:22 +0000 (00:48 +0000)]
MFC r228391:
Fix a bug reported by Irene Ruengeler which resulted in not sending
out HEARTBEATs when requested by the user. The HEARTBEATs were only
queued, but not actually sent out.

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

12 years agoMFC r228102:
tuexen [Sat, 11 Feb 2012 00:46:06 +0000 (00:46 +0000)]
MFC r228102:
Remove debug code.

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

12 years agoMFC r228031:
tuexen [Fri, 10 Feb 2012 23:55:40 +0000 (23:55 +0000)]
MFC r228031:
Fix a warning reported by arundel@.
Fix a bug where the parameter length of a supported address types
parameter is set to a wrong value if the kernel is built with
with either INET or INET6, but not both.

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

12 years agoMFC r227931:
tuexen [Fri, 10 Feb 2012 23:53:06 +0000 (23:53 +0000)]
MFC r227931:
Move up the address to the top of the sctp_udencaps structure
like in all other structures. This avoids alignment problems.

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

12 years agoMFC r227930:
tuexen [Fri, 10 Feb 2012 23:51:23 +0000 (23:51 +0000)]
MFC r227930:
Move up the address to the top of the sctp_paddrthlds structure
like in all other structures. This avoids alignment problems.

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

12 years agoMFC r227755:
tuexen [Fri, 10 Feb 2012 23:49:04 +0000 (23:49 +0000)]
MFC r227755:
Add support for the SCTP_REMOTE_UDP_ENCAPS_PORT socket option.
Retire the the now unused sctp_udp_tunneling_for_client_enable
sysctl variable.

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

12 years agoMFC r227655:
tuexen [Fri, 10 Feb 2012 23:41:37 +0000 (23:41 +0000)]
MFC r227655:
Cleanup comparison of interface names.

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

12 years agoMFC r227540:
tuexen [Fri, 10 Feb 2012 23:38:38 +0000 (23:38 +0000)]
MFC r227540:
Set the MTU of an path to an approriate value if the interface MTU
can't be determined.

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

12 years agoMFC r227486:
tuexen [Fri, 10 Feb 2012 23:36:33 +0000 (23:36 +0000)]
MFC r227486:
Don't copy uninitialized memory. Also simplify the comparison
of interface names.

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

12 years agoMFC r227320:
tuexen [Fri, 10 Feb 2012 23:34:07 +0000 (23:34 +0000)]
MFC r227320:
When loading addresses from INITs, always use the correct
local address.

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

12 years agoMFC r227266:
tuexen [Fri, 10 Feb 2012 23:32:04 +0000 (23:32 +0000)]
MFC r227266:
Initialize all components of the sent COOKIE.

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

12 years agoMFC r226869:
tuexen [Fri, 10 Feb 2012 23:29:08 +0000 (23:29 +0000)]
MFC r226869:
When add a new remote address using sctp_add_remote_addr(),
return the correct net if requested.

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

12 years agoMFC r226868:
tuexen [Fri, 10 Feb 2012 23:26:43 +0000 (23:26 +0000)]
MFC r226868:
Send out control chunks which have no specific destination.

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

12 years agoMFC r226252:
tuexen [Fri, 10 Feb 2012 23:24:34 +0000 (23:24 +0000)]
MFC r226252:
Use the most significant 6 bits of the dscp instead of the least
significant ones.
This has changed in the latest version of the socket API ID and
provides backwards compatibility and gets it in syn with the
usage of the IP_TOS socket option.

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

12 years agoMFC r226203:
tuexen [Fri, 10 Feb 2012 23:19:33 +0000 (23:19 +0000)]
MFC r226203:
When moving an stcb to a new inp and we copy over the list of
bound addresses, update the last used address pointer.
If not, it might result in a crash if the old inp goes away.

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

12 years agoMFC r226168:
tuexen [Fri, 10 Feb 2012 23:17:33 +0000 (23:17 +0000)]
MFC r226168:
Update the inp stored in a HB-timer when moving an stcb to a new inp.
Use only this stored inp when processing a HB timeout.
This fixes a bug which results in a crash.

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

12 years agoMFC r225676:
tuexen [Fri, 10 Feb 2012 23:15:10 +0000 (23:15 +0000)]
MFC r225676:
Cleanup the iterator code, remove code that is never executed.

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

12 years agoMFC r225635:
tuexen [Fri, 10 Feb 2012 23:12:48 +0000 (23:12 +0000)]
MFC r225635:
Fix the enabling/disabling of Heartbeats and path MTU
discovery when using the SCTP_PEER_ADDR_PARAMS socket option.

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

12 years agoMFC r225584:
tuexen [Fri, 10 Feb 2012 23:02:45 +0000 (23:02 +0000)]
MFC r225584:
Fix a typo introduced in
http://svn.freebsd.org/changeset/base/225571
Reported by Ilya A. Arkhipov.

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

12 years agoMFC r225571:
tuexen [Fri, 10 Feb 2012 23:00:24 +0000 (23:00 +0000)]
MFC r225571:
Make sure that SCTP rejects broadcast, multicast and wildcard addresses
as remote addresses.

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

12 years agoMFC r225559:
tuexen [Fri, 10 Feb 2012 22:57:50 +0000 (22:57 +0000)]
MFC r225559:
Ensure that 1-to-1 style SCTP sockets can only be connected once.
Allow implicit setup also for 1-to-1 style sockets as described
in the latest version of the socket API ID.

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

12 years agoMFC r225549:
tuexen [Fri, 10 Feb 2012 22:54:58 +0000 (22:54 +0000)]
MFC r225549:
Fix the handling of the flowlabel and DSCP value in the SCTP_PEER_ADDR_PARAMS
socket option.
Honor the net.inet6.ip6.auto_flowlabel sysctl setting.

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

12 years agoMFC r225462:
tuexen [Fri, 10 Feb 2012 22:52:08 +0000 (22:52 +0000)]
MFC r225462:
Improve implementation of the Nagle algorithm for SCTP:
Don't delay the final fragment of a fragmented user message.

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

12 years agoMFC r224918:
tuexen [Fri, 10 Feb 2012 22:49:09 +0000 (22:49 +0000)]
MFC r224918:
Fix the handling of [gs]etsockopt() unconnected 1-to-1 style sockets.
While there:
* Fix a locking issue in setsockopt() of SCTP_CMT_ON_OFF.
* Fix a bug in setsockopt() of SCTP_DEFAULT_PRINFO, where the pr_value
  was ignored.

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

12 years agoMFC r224870:
tuexen [Fri, 10 Feb 2012 22:44:36 +0000 (22:44 +0000)]
MFC r224870:
Add support for the spp_dscp field in the SCTP_PEER_ADDR_PARAMS
socket option. Backwards compatibility is provided by still
supporting the spp_ipv4_tos field.

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

12 years agoMFC r224641:
tuexen [Fri, 10 Feb 2012 22:42:03 +0000 (22:42 +0000)]
MFC r224641:
The result of a joint work between rrs@ and myself at the IETF:
* Decouple the path supervision using a separate HB timer per path.
* Add support for potentially failed state.
* Bring back RTO.min to 1 second.
* Accept packets on IP-addresses already announced via an ASCONF
* While there: do some cleanups.

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

12 years agoMFC r224271:
tuexen [Fri, 10 Feb 2012 22:31:47 +0000 (22:31 +0000)]
MFC r224271:
Fix the following bugs related to the SCTP support of netstat:
* Correctly handle -a.
* -A isn't supported.
* Show all closed 1-to-1 and 1-to-many style sockets.
* Show all listening 1-to-many style sockets.
* Use consistent formatting for -W.

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

12 years agoMFC r223965:
tuexen [Fri, 10 Feb 2012 22:29:41 +0000 (22:29 +0000)]
MFC r223965:
Don't check for SOCK_DGRAM anymore. Also remove multicast
related code which is not necessary anymore.

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

12 years agoMFC r223963:
tuexen [Fri, 10 Feb 2012 22:26:33 +0000 (22:26 +0000)]
MFC r223963:
The socket API only specifies SCTP for SOCK_SEQPACKET and
SOCK_STREAM, but not SOCK_DGRAM. So don't register it for
SOCK_DGRAM.
While there, fix some indentation.

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

12 years agoMFC r223947:
tuexen [Fri, 10 Feb 2012 22:21:50 +0000 (22:21 +0000)]
MFC r223947:
Truncate link addresses like it is done for any
other address type.

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

12 years agoMFC r223697:
tuexen [Fri, 10 Feb 2012 22:19:07 +0000 (22:19 +0000)]
MFC r223697:
Add the missing sca_keylength field to the sctp_authkey structure,
which is used the the SCTP_AUTH_KEY socket option.

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

12 years agoMFC r223613:
tuexen [Fri, 10 Feb 2012 22:16:52 +0000 (22:16 +0000)]
MFC r223613:
Add support for SCTP_PR_SCTP_NONE which I misded to add.
This constant is defined in the socket API ID.

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

12 years agoMFC r223225:
tuexen [Fri, 10 Feb 2012 22:14:34 +0000 (22:14 +0000)]
MFC r223225:
Document the latest changes to sctp_opt_info() in the code.
This makes sctp_opt_info() compiliant with the latest version
of the socket API ID.

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

12 years agoMFC r223178:
tuexen [Fri, 10 Feb 2012 22:13:11 +0000 (22:13 +0000)]
MFC r223178:
Update the list of supported socket options for sctp_opt_info().

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

12 years agoMFC 223162:
tuexen [Fri, 10 Feb 2012 22:10:36 +0000 (22:10 +0000)]
MFC 223162:
Add SCTP_DEFAULT_PRINFO socket option.
Fix the SCTP_DEFAULT_SNDINFO socket option: Don't clear the
PR SCTP policy when setting sinfo_flags.

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

12 years agoMFC r223154:
tuexen [Fri, 10 Feb 2012 22:07:51 +0000 (22:07 +0000)]
MFC r223154:
Fix two typos and remove redundant code.

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

12 years agoMFC r223152:
tuexen [Fri, 10 Feb 2012 22:06:08 +0000 (22:06 +0000)]
MFC r223152:
* Fix the handling of addresses in sctp_sendv().
* Add support for SCTP_SENDV_NOINFO.
* Improve the error handling of sctp_sendv() and sctp_recv().

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

12 years agoMFC r223132:
tuexen [Fri, 10 Feb 2012 21:28:38 +0000 (21:28 +0000)]
MFC r223132:
Add support for the newly added SCTP API.
In particular add support for:
* SCTP_SNDINFO, SCTP_PRINFO, SCTP_AUTHINFO, SCTP_DSTADDRV4, and
  SCTP_DSTADDRV6 cmsgs.
* SCTP_NXTINFO and SCTP_RCVINFO cmgs.
* SCTP_EVENT, SCTP_RECVRCVINFO, SCTP_RECVNXTINFO and SCTP_DEFAULT_SNDINFO
  socket option.
* Special association ids (SCTP_FUTURE_ASSOC, ...)
* sctp_recvv() and sctp_sendv() functions.
Modified because SCTP_MAXBURST was not backported.

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

12 years agoMFC r222459:
tuexen [Fri, 10 Feb 2012 21:07:52 +0000 (21:07 +0000)]
MFC r222459:
Get rid of unused functions.

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

12 years agoMFC r222077:
tuexen [Fri, 10 Feb 2012 21:05:34 +0000 (21:05 +0000)]
MFC r222077:
Unbreak INET-less build.
Reported by bz@

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

12 years agoMFC r222029:
tuexen [Fri, 10 Feb 2012 21:03:17 +0000 (21:03 +0000)]
MFC r222029:
Copy out the mtu when calling getsockopt() with SCTP_GET_PEER_ADDR_INFO.

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

12 years agoMFC r222028:
tuexen [Fri, 10 Feb 2012 21:01:06 +0000 (21:01 +0000)]
MFC r222028:
Fix whitespacing.
Reported by scf@

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

12 years agoMFC r221904:
tuexen [Fri, 10 Feb 2012 20:57:46 +0000 (20:57 +0000)]
MFC r221904:
Fix the source address selection for boundall sockets
when sending INITs to a global IPv4 address having
only private IPv4 address.
Allow the usage of a private address and make sure
that no other private address will be used by the
association.
Initial work was done by rrs@.

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

12 years agoMFC r221627:
tuexen [Fri, 10 Feb 2012 20:54:20 +0000 (20:54 +0000)]
MFC r221627:
Fix a locking issue showing up on Mac OS X when subscribing to
authentication events. DTLS/SCTP renegotiations trigger the bug.

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

12 years agoMFC r221549:
tuexen [Fri, 10 Feb 2012 20:49:18 +0000 (20:49 +0000)]
MFC r221549:
Change the name of an internal structure, since the name
is used by a structure of the (new) SCTP API.

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

12 years agoMFC r221512:
tuexen [Fri, 10 Feb 2012 20:45:17 +0000 (20:45 +0000)]
MFC r221512:
* Update copyright notice.
* Cleanup usage of iov's.
* Add support for SCTP_TIMEOUTS socketoption.
* Fix a bug in sctp_recvmsg(): return the msg_flags in case of an error.
* Fix a bug in the error handling of sctp_peeloff(): return the -1.

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

12 years agoMFC r221460:
tuexen [Fri, 10 Feb 2012 20:38:44 +0000 (20:38 +0000)]
MFC r221460:
Implement Resource Pooling V2 and an MPTCP like congestion
control.
Based on a patch received from Martin Becke.

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

12 years agoMFC r221411:
tuexen [Fri, 10 Feb 2012 20:36:17 +0000 (20:36 +0000)]
MFC r221411:
Remove code with any effect.

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

12 years agoMFC r221410:
tuexen [Fri, 10 Feb 2012 20:34:20 +0000 (20:34 +0000)]
MFC r221410:
Add a missing break. This bug was introduced in r221249.

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

12 years agoMFC r221328:
tuexen [Fri, 10 Feb 2012 20:31:59 +0000 (20:31 +0000)]
MFC r221328:
Some more cleanups related to an kernel without INET.

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

12 years agoMFC r221251:
tuexen [Fri, 10 Feb 2012 20:29:55 +0000 (20:29 +0000)]
MFC r221251:
Remove some leftover debug code.

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

12 years agoMFC r221249:
tuexen [Fri, 10 Feb 2012 20:27:58 +0000 (20:27 +0000)]
MFC r221249:
Improve compilation of SCTP code without INET support.
Some bugs where fixed while doing this:
* ASCONF-ACK messages might use wrong port number when using
  IPv6.
* Checking for additional addresses takes the correct address
  into account and also does not do more comparisons than
  necessary.

This patch is based on one received from bz@ who was
sponsored by The FreeBSD Foundation and iXsystems.

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

12 years agoMFC r219397:
tuexen [Fri, 10 Feb 2012 20:22:45 +0000 (20:22 +0000)]
MFC r219397:
Tunes and fixes the new DC-CC to seem to hit the
right mix.  Still may need some tweaks but it
appears to almost not give away too much to an
RFC2581 flow, but can really minimize the amount of
buffers used in the net.
From rrs@.

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

12 years agoMFC r219120:
tuexen [Fri, 10 Feb 2012 20:19:38 +0000 (20:19 +0000)]
MFC r219120:
Adds a new Congestion Control that helps reduce
the RTT that a flow will build up in buffers in
transit. It is a slight modification to RFC2581
but is more friendly i.e. less aggressive.
From rrs@.

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

12 years agoMFC r219057:
tuexen [Fri, 10 Feb 2012 20:17:28 +0000 (20:17 +0000)]
MFC r219057:
Improvements to CC modules:
1) Add four new points that allow you to get more information
   to cc algo's
2) Fix the case where user changes module on a existing TCB, in
   such a case, the initialization module needs to be called on all nets.
3) Move htcp_cc structure to a union that other modules can use.
4) Add 5th point for get/set socket options for cc_module specific options
From rrs@.

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

12 years agoMFC r219014:
tuexen [Fri, 10 Feb 2012 20:09:23 +0000 (20:09 +0000)]
MFC r219014:
* Fix several bugs where the scaled versions of srtt and rttvar
  where used incorrectly.
* Use appropriate variable names for RTO instead of RTT.

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

12 years agoMFC r219013:
tuexen [Fri, 10 Feb 2012 20:07:01 +0000 (20:07 +0000)]
MFC r219013:
* Cleanup the code computing the retransmission timeout.
* Fix an initialization bug for the scaled variance of the RTO.

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

12 years agoMFC r218818:
tuexen [Fri, 10 Feb 2012 20:00:21 +0000 (20:00 +0000)]
MFC r218818:
Bugfix: Get per vnet sysctl variables and statistics working.

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

12 years agoMFC r218641:
tuexen [Fri, 10 Feb 2012 19:57:58 +0000 (19:57 +0000)]
MFC r218641:
Fix a bug reported by Jonathan Leighton in his web-sctp testing
at the Univ-of-Del. Basically when a 1-to-1 socket did a
socket/bind/send(data)/close. If the timing was right
we would dereference a socket that is NULL.
From rrs@.

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

12 years agoMFC r218639:
tuexen [Fri, 10 Feb 2012 19:56:02 +0000 (19:56 +0000)]
MFC r218639:
Fix several bugs related to stream scheduling.

Obtained from: Robin Seggelmann

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

12 years agoMFC r218521:
tuexen [Fri, 10 Feb 2012 19:54:18 +0000 (19:54 +0000)]
MFC r218521:
Remove addresses from endpoint when there are no associations.
This fixes a bug reported by brucec@.

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

12 years agoMFC r218400:
tuexen [Fri, 10 Feb 2012 19:52:18 +0000 (19:52 +0000)]
MFC r218400:
Fix bugs related to M_FLOWID:
* Store the flowid when receiving an SCTP/IPv6 packet.
* Store the flowid when receiving an SCTP packet with wrong CRC.
* Initilize flowid correctly.
* Put test code under INVARIANTS.

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