tuexen
2720ac2544
Put the offset of the CRC32C in csum_data instead of 0.
...
The virtio driver needs the offset to be stored in csum_data,
like in the case for UDP and TCP.
The virtio problem was reported by
Niu Zhixiong <kaiaixi@gmail.com>, who helped in debugging
and testing the patch.
MFC after: 3 days
2014-03-12 17:18:15 +00:00
tuexen
a1eb8eb32c
Remove redundant code and fix a style error.
...
MFC after: 3 days
2014-02-20 20:14:43 +00:00
tuexen
a0df441eef
Use SCTP_PR_SCTP_TTL when the user provides a positive
...
timetolive in sctp_sendmsg().
MFC after: 3 days
2013-11-16 19:57:56 +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
545d815a3b
Fix the aborting of association with the iterator using an empty
...
user initiated error cause (using SCTP_ABORT|SCTP_SENDALL).
Approved by: re (delphij)
MFC after: 1 week
2013-09-09 21:40:07 +00:00
tuexen
0ad83fb985
Remove redundant field pr_sctp_on.
...
MFC after: 1 week
2013-09-03 19:31:59 +00:00
tuexen
d6366593f2
Use uint16_t instead of in_port_t for consistency with the SCTP code.
...
MFC after: 1 week
2013-09-02 23:27:53 +00:00
tuexen
1201f3dac8
Don't send uninitialized memory (two instances of 4 bytes) in
...
every cookie on the wire. This bug was reported in
https://bugzilla.mozilla.org/show_bug.cgi?id=905080
MFC after: 3 days
2013-08-14 21:51:32 +00:00
tuexen
46940b6a95
Make the features a 64-bit value instead of 32-bit.
...
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
2013-08-12 13:52:15 +00:00
tuexen
9f5ff4a4a0
Get the code compiling without INET and INET6 being defined.
...
This is not possible in FreeBSD, but in the upstream code.
MFC after: 2 weeks
2013-07-19 21:16:59 +00:00
tuexen
d482c3688d
Don't send an ABORT chunk with verification 0.
...
MFC after: 1 week
2013-05-17 21:45:52 +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
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
9194fa5887
Get it compiling without INET and INET6 support (mainly userland stack).
...
MFC after: 2 weeks
2012-12-08 15:11:09 +00:00
tuexen
a7d0df2ed1
Use correct padding of the ABORT chunk in case of an user initiated
...
abort cause is used.
MFC after: 2 weeks
2012-12-08 09:50:38 +00:00
tuexen
fe8921373b
Ensure that the padding of the last parameter of an INIT chunk
...
is not included in the chunk length as required by RFC 4960.
While there, cleanup sctp_send_initiate().
MFC after: 2 weeks
2012-12-08 08:22:33 +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
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
7e9001b55a
Add some missing changes missed in the last commit.
...
MFC after: 1 week
X-MFC with: 242708
2012-11-07 21:25:32 +00:00
tuexen
f1eb961773
Move from early SSN assignment to late SSN assignment.
...
This doesn't change functionality, but makes upcoming change
much easier.
Developed with rrs@ at the IETF 85.
MFC after: 1 week
2012-11-05 20:55:17 +00:00
tuexen
bd5ecc606d
Add braces (as used elsewhere in the SCTP code).
2012-10-29 20:44:29 +00:00
glebius
5cc3ac5902
Switch the entire IPv4 stack to keep the IP packet header
...
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>
2012-10-22 21:09:03 +00:00
tuexen
0f22c3a78e
Declare a static function as such.
...
MFC after: 3 days
2012-09-23 07:23:18 +00:00
tuexen
392169f5f0
Small cleanups. No functional change.
...
MFC after: 10 days
2012-09-22 14:39:20 +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
924bc7cbef
Use the consistenly the size of a variable. This helps to keep the code
...
simpler for the userland implementation.
MFC after: 3 days
2012-09-04 22:45:00 +00:00
tuexen
2357a49326
Changes which improve compilation if neither INET nor INET6 is defined.
...
MFC after: 3 days
2012-07-15 20:16:17 +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
f2119ca1a3
Fix a bug introduced in r237715.
...
MFC after:i 3 days.
2012-07-09 10:59:39 +00:00
tuexen
4f65fa236f
Use consistent method to determine IPV4_OUTPUT/IPV6_OUTPUT.
...
MFC after: 3 days
2012-07-04 20:59:30 +00:00
tuexen
be3caf7d1b
Use CSUM_SCTP_IPV6 for IPv6.
...
MFC after: 3 days
2012-07-04 20:29:16 +00:00
glebius
418a04b467
When ip_output()/ip6_output() is supplied a struct route *ro argument,
...
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)
2012-07-04 07:37:53 +00:00
tuexen
985a80869f
Remove dead code (on FreeBSD) as suggested by glebius@.
...
MFC after: 3 days
2012-07-02 16:40:11 +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
6e403ce2d9
Whitespace cleanup.
...
MFC after: 3 days
2012-06-25 17:15:09 +00:00
tuexen
c8e30b0c20
Pass the packet length explicitly around.
...
MFC after: 3 days
2012-06-24 23:12:24 +00:00
tuexen
9f34b53f7b
Do packet logging in a consistent way.
...
MFC after: 3 days
2012-06-24 21:25:54 +00:00
tuexen
e8af286138
Pass flowid explicitly through the stack instead of taking it from
...
the mbuf chain at different places.
While there: Fix several bugs related to VRFs.
MFC after: 3 days
2012-06-14 06:54:48 +00:00
tuexen
45eb5de175
Unify the sending of ABORT, SHUTDOWN-COMPLETE and ERROR chunks.
...
While there: Fix also some minor bugs and prepare for SCTP/DTLS.
MFC after: 3 days
2012-06-12 13:15:27 +00:00
tuexen
6f6d510dc7
Honor sysctl for TTL.
...
MFC after: 3 days
2012-06-02 21:22:26 +00:00
tuexen
6984141938
Don't request data from the IPv6 layer, which is not used.
...
MFC after: 3 days
2012-06-02 20:53:23 +00:00
tuexen
dc64091687
Seperate SCTP checksum offloading for IPv4 and IPv6.
...
While there: remove some trainling whitespaces.
MFC after: 3 days
X-MFC with: 236170
2012-05-30 20:56:07 +00:00
tuexen
520d26f351
Get rid of SCTP specific code to avoid CRC32C computations on loopback.
...
Just just offloading.
MFC after: 3 days
2012-05-26 09:16:33 +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
23a2415932
Support SCTP_EOF also for 1-to-1 style sockets.
...
MFC after: 3 days
2012-05-17 17:02:47 +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
8b015cb78f
Provide the error code in SCTP_PEER_ADDR_CHANGE notifications as
...
specified in RFC 6458.
MFC after: 3 days
2012-05-13 17:36:04 +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