summaryrefslogtreecommitdiffstats
path: root/sys/netinet/sctp_pcb.c
Commit message (Collapse)AuthorAgeFilesLines
* MFC r265455:tuexen2014-06-221-8/+0
| | | | | | 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 r263922:tuexen2014-06-221-1/+8
| | | | | | | 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 r263237:tuexen2014-06-221-36/+3
| | | | | | | | | | * 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 r258574:tuexen2013-12-031-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. MFC r258765: 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. Approved by: re@ (gjb)
* MFC r256556:tuexen2013-11-211-30/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove a buggy comparision when setting manually the path MTU. After fixing, the comparision would have become redundant. Thanks to Andrew Galante for reporting the issue. MFC r257272: Fix compilation if SCTP_DONT_DO_PRIVADDR_SCOPE is defined. The issue was reported by Andrew Galante. MFC r257274: Fix the value of *optlen when calling getsockopt() for SCTP_REMOTE_UDP_ENCAPS_PORT. This issue was reported by Andrew Galante. MFC r257359: Terminate a debug output with a \n. MFC r257555: Changes from upstream to improve compilation when INET or INET6 or none of them is defined. MFC r257574: Unlock the lock before destroying it. This issue was reported by Andrew Galante. MFC r257800: Use htons()/ntohs() appropriately. These issues were reported by Andrew Galante. MFC r257803: Make sure that we don't try to build an ASCONF-ACK chunk larger than what fits in the the mbuf cluster. This issue was reported by Andrew Galante. MFC r257804: Get rid of the artification limitation enforced by SCTP_AUTH_RANDOM_SIZE_MAX. This was suggested by Andrew Galante. MFC r258221: 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 r258224: When determining if an address belongs to an stcb, take the address family into account for wildcard bound endpoints. MFC r258228: Remove a stray write operation. MFC r258235: Use SCTP_PR_SCTP_TTL when the user provides a positive timetolive in sctp_sendmsg(). Approved by: re@
* Fix a bug were only 2048 streams where usable even though more thantuexen2013-07-051-3/+1
| | | | | | | 2048 streams were negotiated on the wire. While there, remove the hard coded limit of 2048 streams. MFC after: 3 days
* Code cleanups.tuexen2013-07-031-75/+67
| | | | MFC after: 3 days
* Honor the net.inet6.ip6.v6only sysctl variable and the IPV6_V6ONLYtuexen2013-05-101-2/+7
| | | | | | | socket option for SCTP sockets in the same way as for UDP or TCP sockets. MFC after: 2 weeks
* Send the adaptation layer indication only if set by the user.tuexen2013-02-111-1/+2
| | | | | MFC after: 3 days Discussed with: rrs
* Don't send kernel provided information in the User Initiatedtuexen2013-02-111-32/+13
| | | | | | | | | | | 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
* Make sure that received packets for removed addresses are handledtuexen2013-02-101-180/+192
| | | | | | consistently. While there, make variable names consistent. MFC after: 3 days
* Cleanup the handling of address scopes. Announce in the INIT/INIT-ACKtuexen2013-02-091-43/+46
| | | | | | | only the supported address types. While there, do some whitespace cleanups. MFC after: 1 week
* Fix a bug where HEARTBEATs were still sent in SHUTDOWN_SENT ortuexen2013-02-091-6/+7
| | | | | | | SHUTDOWN_ACK_SENT state. While there, make the corresponding code consistent. MFC after: 1 week
* Minor cleanups of debug messages.tuexen2012-12-271-2/+2
| | | | MFC after: 3 days
* Mechanically substitute flags from historic mbuf allocator withglebius2012-12-051-3/+3
| | | | | | | | | malloc(9) flags within sys. Exceptions: - sys/contrib not touched - sys/mbuf.h edited manually
* Find the endpoint for an incoming packet also if the endpointtuexen2012-11-261-1/+2
| | | | | | comes from sctp_peeloff(). MFC after: 3 days
* Get the accounting working. We now have counters how manytuexen2012-11-161-1/+15
| | | | | | | | | 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
* Add per outgoing stream accounting for chunks in the sendtuexen2012-11-071-0/+9
| | | | | | | | 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
* Whitespace change.tuexen2012-09-231-2/+1
| | | | MFC after: 3 days
* Whitespace changes.tuexen2012-09-091-6/+4
| | | | MFC after: 10 days
* Using %p in a format string requires a void *.tuexen2012-09-051-10/+10
| | | | MFC after: 10 days
* Fix a refcount issue. The called only decrements is stcb is NULL.tuexen2012-08-051-4/+3
| | | | | MFC after: 3 days Discussed with: rrs
* Fix a bug reported by Simon L. B. Nielsen:tuexen2012-08-041-2/+0
| | | | | | | | If an SCTP endpoint receives an ASCONF with a wildcard lookup address and incorrect verification tag, the system crashes. MFC after: 3 days.
* Fix a refcount bug when freeing an association.tuexen2012-07-171-7/+3
| | | | | | While there: Change code to be consistent. Discussed with rrs@. MFC after: 3 days
* #ifdef INET and INET6 consistently. This also fixes a bug, wheretuexen2012-07-151-1/+9
| | | | | | it was done wrong. MFC after: 3 days
* Use case for selecting the address family (as in other places).tuexen2012-07-141-3/+10
| | | | MFC after: 3 days
* Pass the src and dst address of a received packet explicitly around.tuexen2012-06-281-196/+23
| | | | MFC after: 3 days
* Remove code which is not needed.tuexen2012-06-031-4/+0
| | | | MFC after: 3 days
* Use consistent text at the begining of the files.tuexen2012-05-231-4/+2
| | | | MFC after: 3 days
* Provide in the SCTP_SEND_FAILED and SCTP_SEND_FAILED_EVENT notificationstuexen2012-05-131-6/+5
| | | | | | the correct ssf_error or ssfe_error as required by RFC 6458. MFC after: 3 days
* Provide in the association change notification the received ABORT chunktuexen2012-05-121-2/+2
| | | | | | if case of SCTP_COMM_LOST or SCTP_CANT_STR_ASSOC as required by RFC 6458. MFC after: 3 days
* Remove debug code.tuexen2012-05-061-10/+0
| | | | MFC after: 3 days
* Use SCTP_PRINTF() instead of printf() in all SCTP sources.tuexen2012-05-041-5/+5
| | | | MFC after: 3 days
* Address issues found by clang. While there, fix also some styletuexen2011-12-271-23/+13
| | | | | | issues. MFC after: 3 months.
* Fix unused parameter warnings.tuexen2011-12-171-11/+15
| | | | | | While there, fix some whitespace issues. MFC after: 3 months.
* Remove debug code.tuexen2011-11-281-7/+0
| | | | MFC after: 1 month.
* Add support for the SCTP_REMOTE_UDP_ENCAPS_PORT socket option.tuexen2011-11-201-6/+3
| | | | | | | Retire the the now unused sctp_udp_tunneling_for_client_enable sysctl variable. MFC after: 3 months.
* Cleanup comparison of interface names.tuexen2011-11-181-24/+4
| | | | MFC after: 1 month.
* Set the MTU of an path to an approriate value if the interface MTUtuexen2011-11-151-16/+26
| | | | | | can't be determined. MFC after: 3 days.
* Don't copy uninitialized memory. Also simplify the comparisontuexen2011-11-131-15/+5
| | | | | | of interface names. MFC after: 3 days.
* When loading addresses from INITs, always use the correcttuexen2011-11-071-37/+48
| | | | | | local address. MFC after: 3 days.
* When add a new remote address using sctp_add_remote_addr(),tuexen2011-10-271-3/+3
| | | | | | return the correct net if requested. MFC after: 3 days.
* When moving an stcb to a new inp and we copy over the list oftuexen2011-10-101-0/+3
| | | | | | | 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.
* Update the inp stored in a HB-timer when moving an stcb to a new inp.tuexen2011-10-091-0/+1
| | | | | | | Use only this stored inp when processing a HB timeout. This fixes a bug which results in a crash. MFC after: 3 days.
* Fix the enabling/disabling of Heartbeats and path MTUtuexen2011-09-171-1/+6
| | | | | | discovery when using the SCTP_PEER_ADDR_PARAMS socket option. Approved by: re MFC after: 1 month.
* Make sure that SCTP rejects broadcast, multicast and wildcard addressestuexen2011-09-151-3/+7
| | | | | | | as remote addresses. Approved by: re MFC after: 1 month.
* Ensure that 1-to-1 style SCTP sockets can only be connected once.tuexen2011-09-141-0/+10
| | | | | | | | Allow implicit setup also for 1-to-1 style sockets as described in the latest version of the socket API ID. Approved by: re MFC after: 1 month
* Fix the handling of the flowlabel and DSCP value in the SCTP_PEER_ADDR_PARAMStuexen2011-09-141-0/+14
| | | | | | | | socket option. Honor the net.inet6.ip6.auto_flowlabel sysctl setting. Approved by: re (bz) MFC after: 1 month.
* Add support for the spp_dscp field in the SCTP_PEER_ADDR_PARAMStuexen2011-08-141-9/+2
| | | | | | | | socket option. Backwards compatibility is provided by still supporting the spp_ipv4_tos field. Approved by: re@ MFC after: 2 months.
* The result of a joint work between rrs@ and myself at the IETF:tuexen2011-08-031-24/+58
| | | | | | | | | | | * 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. Approved by: re@ MFC after: 2 months.
OpenPOWER on IntegriCloud