summaryrefslogtreecommitdiffstats
path: root/sys/netinet/sctp_usrreq.c
Commit message (Collapse)AuthorAgeFilesLines
* MFC r263237:tuexen2014-06-221-25/+2
| | | | | | | | | | * 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 r259943:tuexen2014-01-071-1/+1
| | | | Address some warnings which showed up on the userland version.
* MFC r256556:tuexen2013-11-211-14/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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@
* Micro-optimization suggested intuexen2013-08-011-4/+3
| | | | | | | https://bugzilla.mozilla.org/show_bug.cgi?id=898234 by pchang9. While there simplify the code. MFC after: 1 week
* Send the adaptation layer indication only if set by the user.tuexen2013-02-111-0/+1
| | | | | MFC after: 3 days Discussed with: rrs
* Don't send kernel provided information in the User Initiatedtuexen2013-02-111-22/+10
| | | | | | | | | | | 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
* Cleanup the handling of address scopes. Announce in the INIT/INIT-ACKtuexen2013-02-091-22/+40
| | | | | | | 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-17/+16
| | | | | | | SHUTDOWN_ACK_SENT state. While there, make the corresponding code consistent. MFC after: 1 week
* Some cleanups.tuexen2012-12-271-15/+9
| | | | 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
* Allow shutdown() to be used on fds returned from sctp_peeloff().tuexen2012-11-261-1/+2
| | | | MFC after: 3 days
* Switch the entire IPv4 stack to keep the IP packet headerglebius2012-10-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | in network byte order. Any host byte order processing is done in local variables and host byte order values are never[1] written to a packet. After this change a packet processed by the stack isn't modified at all[2] except for TTL. After this change a network stack hacker doesn't need to scratch his head trying to figure out what is the byte order at the given place in the stack. [1] One exception still remains. The raw sockets convert host byte order before pass a packet to an application. Probably this would remain for ages for compatibility. [2] The ip_input() still subtructs header len from ip->ip_len, but this is planned to be fixed soon. Reviewed by: luigi, Maxim Dounin <mdounin mdounin.ru> Tested by: ray, Olivier Cochard-Labbe <olivier cochard.me>
* Changes which improve compilation if neither INET nor INET6 is defined.tuexen2012-07-151-10/+4
| | | | MFC after: 3 days
* #ifdef INET and INET6 consistently. This also fixes a bug, wheretuexen2012-07-151-1/+1
| | | | | | it was done wrong. MFC after: 3 days
* Pass the src and dst address of a received packet explicitly around.tuexen2012-06-281-4/+4
| | | | MFC after: 3 days
* Whitespace cleanup.tuexen2012-06-251-4/+4
| | | | MFC after: 3 days
* Remove redundant #ifdef. Reported by gnn@.tuexen2012-06-211-2/+0
| | | | MFC after: 3 days
* Use consistent text at the begining of the files.tuexen2012-05-231-4/+3
| | | | MFC after: 3 days
* Provide the error code in SCTP_PEER_ADDR_CHANGE notifications astuexen2012-05-131-9/+9
| | | | | | specified in RFC 6458. MFC after: 3 days
* Use ECONNABORTED in cases where the ABORT was sent to the peer.tuexen2012-05-131-1/+1
| | | | MFC after: 3 days
* Provide in the association change notification the received ABORT chunktuexen2012-05-121-6/+2
| | | | | | if case of SCTP_COMM_LOST or SCTP_CANT_STR_ASSOC as required by RFC 6458. MFC after: 3 days
* Address clang warnings.tuexen2012-05-061-4/+2
| | | | MFC after: 3 days
* Remove debug code.tuexen2012-05-061-10/+0
| | | | MFC after: 3 days
* Add support for SCTP_SEND_FAILED_EVENT as required by RFC 6458.tuexen2012-05-061-0/+6
| | | | MFC after: 3 days
* Do error checking for the SCTP_RESET_STREAMS, SCTP_RESET_ASSOC,tuexen2012-05-051-19/+15
| | | | | | and SCTP_ADD_STREAMS socket options as specified by RFC 6525. MFC after: 3 days
* Add support for the SCTP_ENABLE_STREAM_RESET socket option totuexen2012-05-041-5/+30
| | | | | | getsockopt(). This improves the support of RFC 6525. MFC after: 3 days
* Add support for SCTP_STREAM_CHANGE_EVENT, SCTP_ASSOC_RESET_EVENT astuexen2012-05-041-0/+12
| | | | | | required by RFC 6525. This also fixes SCTP_STREAM_RESET_EVENT. MFC after: 3 days
* Add support for missing gauth_number_of_chunks field. This Bug wastuexen2012-04-301-0/+3
| | | | | | found by Irene Ruengeler. MFC after: 1 week
* Whitespace changes.tuexen2012-04-281-3/+0
| | | | MFC after: 3 days
* Whitespace changes.tuexen2012-04-191-1/+1
| | | | MFC after: 3 days
* Remove duplicate condition in if statement.tuexen2012-04-061-1/+0
| | | | | Obtained from: brucec@ MFC after: 3 days
* Make stream our stream reset implementationrrs2012-03-291-114/+163
| | | | | | compliant to RFC6525. MFC after: 1 month
* Clean up, no functional change.tuexen2012-03-151-16/+11
| | | | MFC after: 3 days.
* Remove two clang warnings.tuexen2012-02-181-1/+1
| | | | MFC after: 1 month.
* Fix two bugs, which result in a panic when calling getsockopt()tuexen2012-01-141-2/+2
| | | | | | | using SCTP_RECVINFO or SCTP_NXTINFO. Reported by Clement Lecigne and forwarded to us by zi@. MFC after: 3 days.
* Address issues found by clang. While there, fix also some styletuexen2011-12-271-34/+27
| | | | | | issues. MFC after: 3 months.
* Fix unused parameter warnings.tuexen2011-12-171-11/+8
| | | | | | While there, fix some whitespace issues. MFC after: 3 months.
* Fix a bug reported by Irene Ruengeler which resulted in not sendingtuexen2011-12-101-0/+1
| | | | | | | out HEARTBEATs when requested by the user. The HEARTBEATs were only queued, but not actually sent out. MFC after: 2 months.
* Add support for the SCTP_REMOTE_UDP_ENCAPS_PORT socket option.tuexen2011-11-201-1/+169
| | | | | | | Retire the the now unused sctp_udp_tunneling_for_client_enable sysctl variable. MFC after: 3 months.
* Use the most significant 6 bits of the dscp instead of the leasttuexen2011-10-111-7/+7
| | | | | | | | | 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. MFC after: 3 days.
* Fix the enabling/disabling of Heartbeats and path MTUtuexen2011-09-171-19/+29
| | | | | | 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-1/+1
| | | | | | | 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-9/+5
| | | | | | | | 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-28/+48
| | | | | | | | socket option. Honor the net.inet6.ip6.auto_flowlabel sysctl setting. Approved by: re (bz) MFC after: 1 month.
* Fix the handling of [gs]etsockopt() unconnected 1-to-1 style sockets.tuexen2011-08-161-37/+114
| | | | | | | | | | 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. Approved by: re@ MFC after: 2 months.
* Add support for the spp_dscp field in the SCTP_PEER_ADDR_PARAMStuexen2011-08-141-23/+14
| | | | | | | | 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-100/+410
| | | | | | | | | | | * 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.
* Add the missing sca_keylength field to the sctp_authkey structure,tuexen2011-06-301-1/+11
| | | | | | which is used the the SCTP_AUTH_KEY socket option. MFC after: 1 month.
* Add SCTP_DEFAULT_PRINFO socket option.tuexen2011-06-161-0/+74
| | | | | | | Fix the SCTP_DEFAULT_SNDINFO socket option: Don't clear the PR SCTP policy when setting sinfo_flags. MFC after: 1 month.
* Add support for the newly added SCTP API.tuexen2011-06-151-435/+1054
| | | | | | | | | | | | | 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. MFC after: 1 month.
OpenPOWER on IntegriCloud