summaryrefslogtreecommitdiffstats
path: root/sys/netinet/sctp_output.c
Commit message (Collapse)AuthorAgeFilesLines
* MFC r256556:tuexen2013-11-211-7/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 the aborting of association with the iterator using an emptytuexen2013-09-091-37/+35
| | | | | | | user initiated error cause (using SCTP_ABORT|SCTP_SENDALL). Approved by: re (delphij) MFC after: 1 week
* Remove redundant field pr_sctp_on.tuexen2013-09-031-8/+1
| | | | MFC after: 1 week
* Use uint16_t instead of in_port_t for consistency with the SCTP code.tuexen2013-09-021-1/+1
| | | | MFC after: 1 week
* Don't send uninitialized memory (two instances of 4 bytes) intuexen2013-08-141-0/+8
| | | | | | | every cookie on the wire. This bug was reported in https://bugzilla.mozilla.org/show_bug.cgi?id=905080 MFC after: 3 days
* Make the features a 64-bit value instead of 32-bit.tuexen2013-08-121-1/+1
| | | | | | | | This will allow an easier integration of the support for NDATA. While there, do also some minor cleanups. Obtained from: rrs@ MFC after: 2 weeks
* Get the code compiling without INET and INET6 being defined.tuexen2013-07-191-4/+0
| | | | | | This is not possible in FreeBSD, but in the upstream code. MFC after: 2 weeks
* Don't send an ABORT chunk with verification 0.tuexen2013-05-171-2/+10
| | | | MFC after: 1 week
* Send the adaptation layer indication only if set by the user.tuexen2013-02-111-18/+22
| | | | | MFC after: 3 days Discussed with: rrs
* Don't send kernel provided information in the User Initiatedtuexen2013-02-111-2/+2
| | | | | | | | | | | 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-128/+50
| | | | | | | 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-7/+9
| | | | | | | SHUTDOWN_ACK_SENT state. While there, make the corresponding code consistent. MFC after: 1 week
* Get it compiling without INET and INET6 support (mainly userland stack).tuexen2012-12-081-0/+4
| | | | MFC after: 2 weeks
* Use correct padding of the ABORT chunk in case of an user initiatedtuexen2012-12-081-21/+32
| | | | | | abort cause is used. MFC after: 2 weeks
* Ensure that the padding of the last parameter of an INIT chunktuexen2012-12-081-143/+182
| | | | | | | is not included in the chunk length as required by RFC 4960. While there, cleanup sctp_send_initiate(). MFC after: 2 weeks
* Mechanically substitute flags from historic mbuf allocator withglebius2012-12-051-42/+42
| | | | | | | | | malloc(9) flags within sys. Exceptions: - sys/contrib not touched - sys/mbuf.h edited manually
* Get the accounting working. We now have counters how manytuexen2012-11-161-3/+7
| | | | | | | | | 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 some missing changes missed in the last commit.tuexen2012-11-071-1/+2
| | | | | MFC after: 1 week X-MFC with: 242708
* Move from early SSN assignment to late SSN assignment.tuexen2012-11-051-19/+8
| | | | | | | | This doesn't change functionality, but makes upcoming change much easier. Developed with rrs@ at the IETF 85. MFC after: 1 week
* Add braces (as used elsewhere in the SCTP code).tuexen2012-10-291-2/+2
|
* Switch the entire IPv4 stack to keep the IP packet headerglebius2012-10-221-4/+4
| | | | | | | | | | | | | | | | | | | | | | | 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>
* Declare a static function as such.tuexen2012-09-231-1/+1
| | | | MFC after: 3 days
* Small cleanups. No functional change.tuexen2012-09-221-28/+11
| | | | MFC after: 10 days
* Using %p in a format string requires a void *.tuexen2012-09-051-6/+6
| | | | MFC after: 10 days
* Use the consistenly the size of a variable. This helps to keep the codetuexen2012-09-041-21/+21
| | | | | | simpler for the userland implementation. MFC after: 3 days
* Changes which improve compilation if neither INET nor INET6 is defined.tuexen2012-07-151-1/+8
| | | | MFC after: 3 days
* #ifdef INET and INET6 consistently. This also fixes a bug, wheretuexen2012-07-151-2/+4
| | | | | | it was done wrong. MFC after: 3 days
* Fix a bug introduced in r237715.tuexen2012-07-091-0/+1
| | | | MFC after:i 3 days.
* Use consistent method to determine IPV4_OUTPUT/IPV6_OUTPUT.tuexen2012-07-041-4/+12
| | | | MFC after: 3 days
* Use CSUM_SCTP_IPV6 for IPv6.tuexen2012-07-041-2/+2
| | | | MFC after: 3 days
* When ip_output()/ip6_output() is supplied a struct route *ro argument,glebius2012-07-041-7/+2
| | | | | | | | | | | | | | | | | | | | | | | | | it skips FLOWTABLE lookup. However, the non-NULL ro has dual meaning here: it may be supplied to provide route, and it may be supplied to store and return to caller the route that ip_output()/ip6_output() finds. In the latter case skipping FLOWTABLE lookup is pessimisation. The difference between struct route filled by FLOWTABLE and filled by rtalloc() family is that the former doesn't hold a reference on its rtentry. Reference is hold by flow entry, and it is about to be released in future. Thus, route filled by FLOWTABLE shouldn't be passed to RTFREE() macro. - Introduce new flag for struct route/route_in6, that marks route not holding a reference on rtentry. - Introduce new macro RO_RTFREE() that cleans up a struct route depending on its kind. - All callers to ip_output()/ip6_output() that do supply non-NULL but empty route should use RO_RTFREE() to free results of lookup. - ip_output()/ip6_output() now do FLOWTABLE lookup always when ro->ro_rt == NULL. Tested by: tuexen (SCTP part)
* Remove dead code (on FreeBSD) as suggested by glebius@.tuexen2012-07-021-8/+1
| | | | MFC after: 3 days
* Pass the src and dst address of a received packet explicitly around.tuexen2012-06-281-176/+93
| | | | MFC after: 3 days
* Whitespace cleanup.tuexen2012-06-251-5/+5
| | | | MFC after: 3 days
* Pass the packet length explicitly around.tuexen2012-06-241-26/+5
| | | | MFC after: 3 days
* Do packet logging in a consistent way.tuexen2012-06-241-18/+18
| | | | MFC after: 3 days
* Pass flowid explicitly through the stack instead of taking it fromtuexen2012-06-141-29/+66
| | | | | | | the mbuf chain at different places. While there: Fix several bugs related to VRFs. MFC after: 3 days
* Unify the sending of ABORT, SHUTDOWN-COMPLETE and ERROR chunks.tuexen2012-06-121-601/+128
| | | | | | While there: Fix also some minor bugs and prepare for SCTP/DTLS. MFC after: 3 days
* Honor sysctl for TTL.tuexen2012-06-021-3/+3
| | | | MFC after: 3 days
* Don't request data from the IPv6 layer, which is not used.tuexen2012-06-021-26/+3
| | | | MFC after: 3 days
* Seperate SCTP checksum offloading for IPv4 and IPv6.tuexen2012-05-301-4/+4
| | | | | | | While there: remove some trainling whitespaces. MFC after: 3 days X-MFC with: 236170
* Get rid of SCTP specific code to avoid CRC32C computations on loopback.tuexen2012-05-261-16/+4
| | | | | Just just offloading. MFC after: 3 days
* Use consistent text at the begining of the files.tuexen2012-05-231-4/+2
| | | | MFC after: 3 days
* Support SCTP_EOF also for 1-to-1 style sockets.tuexen2012-05-171-2/+1
| | | | 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 the error code in SCTP_PEER_ADDR_CHANGE notifications astuexen2012-05-131-2/+1
| | | | | | specified in RFC 6458. MFC after: 3 days
* Provide in the association change notification the received ABORT chunktuexen2012-05-121-9/+3
| | | | | | if case of SCTP_COMM_LOST or SCTP_CANT_STR_ASSOC as required by RFC 6458. MFC after: 3 days
* Use SCTP_PRINTF() instead of printf() in all SCTP sources.tuexen2012-05-041-3/+3
| | | | MFC after: 3 days
* Fix another RFC 6458 issue. Spotted by Irene Ruengeler.tuexen2012-05-031-1/+1
| | | | MFC after: 3 days
* Use the same pattern for mbuf logging everywhere.tuexen2012-04-191-24/+8
| | | | MFC after: 3 days
OpenPOWER on IntegriCloud