tuexen
d9071b7221
Honor jails for unbound SCTP sockets when selecting source addresses,
...
reporting IP-addresses to the peer during the handshake, adding
addresses to the host, reporting the addresses via the sysctl
interface (used by netstat, for example) and reporting the
addresses to the application via socket options.
This issue was reported by Bernd Walter.
MFC after: 3 days
2014-06-20 13:26:49 +00:00
tuexen
ebf0ea80e4
Remove unused code. This is triggered by the bugreport of Sylvestre Ledru
...
which deal with useless code in the user land stack:
https://bugzilla.mozilla.org/show_bug.cgi?id=1003929
MFC after: 3 days
2014-05-06 16:51:07 +00:00
tuexen
a92bbbfa13
Handle an edge case of address management similar to TCP.
...
This needs to be reconsidered when the address handling
will be reimplemented.
The patch is from rrs@.
MFC after: 3 days
2014-03-29 21:26:45 +00:00
tuexen
529b98b943
* Provide information in error causes in ASCII instead of
...
proprietary binary format.
* Add support for a diagnostic information error cause.
The code is sysctlable and the default is 0, which
means it is not sent.
This is joint work with rrs@.
MFC after: 1 week
2014-03-16 12:32:16 +00:00
tuexen
38fb2a0d9d
In
...
http://svnweb.freebsd.org/changeset/base/258221
I introduced a bug which initialized global locks
whenever the SCTP stack initialized. This was fixed in
http://svnweb.freebsd.org/changeset/base/258574
by rodrigc@. He just initialized the locks for
the default vnet. This fix reverts to the old
behaviour before r258221, which explicitly makes
sure it is only called once, because this works also on
other platforms.
MFC after: 3 days
X-MFC with: r258574.
2013-11-30 12:51:19 +00:00
rodrigc
919a38db63
Only initialize some mutexes for the default VNET.
...
In r208160, sctp_it_ctl was made a global variable, across all VNETs.
However, sctp_init() is called for every VNET that is created. This results
in the same global mutexes which are part of sctp_it_ctl being initialized. This can result
in crashes if many jails are created.
To reproduce the problem:
(1) Take a GENERIC kernel config, and add options for: VIMAGE, WITNESS,
INVARIANTS.
(2) Run this command in a loop:
jail -l -u root -c path=/ name=foo persist vnet && jexec foo ifconfig lo0 127.0.0.1/8 && jail -r foo
(see http://lists.freebsd.org/pipermail/freebsd-current/2010-November/021280.html )
Witness will warn about the same mutex being initialized.
Fix the problem by only initializing these mutexes in the default VNET.
2013-11-25 18:49:37 +00:00
tuexen
63b4370996
When determining if an address belongs to an stcb, take the address family
...
into account for wildcard bound endpoints.
MFC after: 3 days
2013-11-16 15:34:14 +00:00
tuexen
e109131873
Cleanups which result in fixes which have been made upstream
...
and where partially suggested by Andrew Galante.
There is no functional change in FreeBSD.
MFC after: 3 days
2013-11-16 15:04:49 +00:00
tuexen
8fb2374dfa
Unlock the lock before destroying it.
...
This issue was reported by Andrew Galante.
MFC after: 3 days
2013-11-03 14:00:17 +00:00
tuexen
d30ae7faf7
Changes from upstream to improve compilation when INET or INET6
...
or none of them is defined.
MFC after: 3 days
2013-11-02 20:12:19 +00:00
tuexen
59a2e2d463
Fix compilation if SCTP_DONT_DO_PRIVADDR_SCOPE is defined.
...
The issue was reported by Andrew Galante.
MFC after: 3 days
2013-10-28 20:32:37 +00:00
tuexen
9e48e2f73a
Fix a bug were only 2048 streams where usable even though more than
...
2048 streams were negotiated on the wire. While there, remove the
hard coded limit of 2048 streams.
MFC after: 3 days
2013-07-05 10:08:49 +00:00
tuexen
baf8a88746
Code cleanups.
...
MFC after: 3 days
2013-07-03 18:48:43 +00:00
tuexen
6ea39edf93
Honor the net.inet6.ip6.v6only sysctl variable and the IPV6_V6ONLY
...
socket option for SCTP sockets in the same way as for UDP or TCP
sockets.
MFC after: 2 weeks
2013-05-10 18:09:38 +00:00
tuexen
3017e3b84b
Send the adaptation layer indication only if set by the user.
...
MFC after: 3 days
Discussed with: rrs
2013-02-11 21:02:49 +00:00
tuexen
ccc66b91fb
Don't send kernel provided information in the User Initiated
...
ABORT cause, since the user can also provide this kind of
information. So the receiver doesn't know who provided the
information.
While there: Fix a bug where the stack would send a malformed
ABORT chunk when using a send() call with SCTP_ABORT|SCT_SENDALL
flags.
MFC after: 3 days
2013-02-11 13:57:03 +00:00
tuexen
6e3d604447
Make sure that received packets for removed addresses are handled
...
consistently. While there, make variable names consistent.
MFC after: 3 days
2013-02-10 19:57:19 +00:00
tuexen
026c1e8b1a
Cleanup the handling of address scopes. Announce in the INIT/INIT-ACK
...
only the supported address types. While there, do some whitespace
cleanups.
MFC after: 1 week
2013-02-09 17:26:14 +00:00
tuexen
6b769b5afe
Fix a bug where HEARTBEATs were still sent in SHUTDOWN_SENT or
...
SHUTDOWN_ACK_SENT state. While there, make the corresponding
code consistent.
MFC after: 1 week
2013-02-09 08:27:08 +00:00
tuexen
9b6fdf83a8
Minor cleanups of debug messages.
...
MFC after: 3 days
2012-12-27 08:06:58 +00:00
glebius
8e20fa5ae9
Mechanically substitute flags from historic mbuf allocator with
...
malloc(9) flags within sys.
Exceptions:
- sys/contrib not touched
- sys/mbuf.h edited manually
2012-12-05 08:04:20 +00:00
tuexen
926b939df3
Find the endpoint for an incoming packet also if the endpoint
...
comes from sctp_peeloff().
MFC after: 3 days
2012-11-26 16:43:32 +00:00
tuexen
17aa08aca9
Get the accounting working. We now have counters how many
...
chunks for each SCTP outgoing stream are in the send and
sent queue.
While there, improve the naming of NR-SACK related constants
recently introduced.
MFC after: 1 week
2012-11-16 19:39:10 +00:00
tuexen
2e86daf6ac
Add per outgoing stream accounting for chunks in the send
...
and sent queue. This provides no functional change, but is
a preparation for an upcoming stream reset improvement.
Done with rrs@.
MFC after: 1 week
2012-11-07 22:11:38 +00:00
tuexen
7e065d782a
Whitespace change.
...
MFC after: 3 days
2012-09-23 07:43:10 +00:00
tuexen
3e31feb073
Whitespace changes.
...
MFC after: 10 days
2012-09-09 08:14:04 +00:00
tuexen
1f0bc9debb
Using %p in a format string requires a void *.
...
MFC after: 10 days
2012-09-05 18:52:01 +00:00
tuexen
f3596e49d4
Fix a refcount issue. The called only decrements is stcb is NULL.
...
MFC after: 3 days
Discussed with: rrs
2012-08-05 10:47:18 +00:00
tuexen
3ad906801b
Fix a bug reported by Simon L. B. Nielsen:
...
If an SCTP endpoint receives an ASCONF with a wildcard
lookup address and incorrect verification tag, the system
crashes.
MFC after: 3 days.
2012-08-04 20:40:36 +00:00
tuexen
d0f5f8dadb
Fix a refcount bug when freeing an association.
...
While there: Change code to be consistent.
Discussed with rrs@.
MFC after: 3 days
2012-07-17 13:03:47 +00:00
tuexen
5895ece053
#ifdef INET and INET6 consistently. This also fixes a bug, where
...
it was done wrong.
MFC after: 3 days
2012-07-15 11:04:49 +00:00
tuexen
7f0c39adad
Use case for selecting the address family (as in other places).
...
MFC after: 3 days
2012-07-14 20:08:03 +00:00
tuexen
d2f6540a5c
Pass the src and dst address of a received packet explicitly around.
...
MFC after: 3 days
2012-06-28 16:01:08 +00:00
tuexen
aca0d1e392
Remove code which is not needed.
...
MFC after: 3 days
2012-06-03 18:14:57 +00:00
tuexen
25827ad382
Use consistent text at the begining of the files.
...
MFC after: 3 days
2012-05-23 11:26:28 +00:00
tuexen
ac46646680
Provide in the SCTP_SEND_FAILED and SCTP_SEND_FAILED_EVENT notifications
...
the correct ssf_error or ssfe_error as required by RFC 6458.
MFC after: 3 days
2012-05-13 19:32:49 +00:00
tuexen
b3431e25a4
Provide in the association change notification the received ABORT chunk
...
if case of SCTP_COMM_LOST or SCTP_CANT_STR_ASSOC as required by RFC 6458.
MFC after: 3 days
2012-05-12 20:11:35 +00:00
tuexen
189b3357e6
Remove debug code.
...
MFC after: 3 days
2012-05-06 11:37:41 +00:00
tuexen
a91acdb88b
Use SCTP_PRINTF() instead of printf() in all SCTP sources.
...
MFC after: 3 days
2012-05-04 09:27:00 +00:00
tuexen
b9ef107414
Address issues found by clang. While there, fix also some style
...
issues.
MFC after: 3 months.
2011-12-27 10:16:24 +00:00
tuexen
3a4d069b21
Fix unused parameter warnings.
...
While there, fix some whitespace issues.
MFC after: 3 months.
2011-12-17 19:21:40 +00:00
tuexen
72bf877ee7
Remove debug code.
...
MFC after: 1 month.
2011-11-28 20:48:35 +00:00
tuexen
4de38879e5
Add support for the SCTP_REMOTE_UDP_ENCAPS_PORT socket option.
...
Retire the the now unused sctp_udp_tunneling_for_client_enable
sysctl variable.
MFC after: 3 months.
2011-11-20 15:00:45 +00:00
tuexen
d7e31282cb
Cleanup comparison of interface names.
...
MFC after: 1 month.
2011-11-18 09:01:08 +00:00
tuexen
037a7f90ce
Set the MTU of an path to an approriate value if the interface MTU
...
can't be determined.
MFC after: 3 days.
2011-11-15 20:41:50 +00:00
tuexen
ec6184ed07
Don't copy uninitialized memory. Also simplify the comparison
...
of interface names.
MFC after: 3 days.
2011-11-13 11:53:18 +00:00
tuexen
e86f62e447
When loading addresses from INITs, always use the correct
...
local address.
MFC after: 3 days.
2011-11-07 22:30:19 +00:00
tuexen
7d9c272db1
When add a new remote address using sctp_add_remote_addr(),
...
return the correct net if requested.
MFC after: 3 days.
2011-10-27 22:38:48 +00:00
tuexen
43477149d3
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.
MFC after: 3 days.
2011-10-10 12:28:47 +00:00
tuexen
187fe92b28
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.
MFC after: 3 days.
2011-10-09 14:12:17 +00:00