tuexen
db58bebb35
Address some warnings which showed up on the userland version.
...
MFC after: 1 week
2013-12-27 13:07:00 +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
8cc37ba82f
Fis the value of *optlen when calling getsockopt() for
...
SCTP_REMOTE_UDP_ENCAPS_PORT.
This issue was reported by Andrew Galante.
MFC after: 3 days
2013-10-28 20:45:19 +00:00
tuexen
d87817b289
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 after: 3 days
2013-10-15 20:21:27 +00:00
tuexen
cfbde72679
Micro-optimization suggested in
...
https://bugzilla.mozilla.org/show_bug.cgi?id=898234
by pchang9. While there simplify the code.
MFC after: 1 week
2013-08-01 12:05:23 +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
c79f406296
Some cleanups.
...
MFC after: 3 days
2012-12-27 08:10: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
6c15e1ad42
Allow shutdown() to be used on fds returned from sctp_peeloff().
...
MFC after: 3 days
2012-11-26 08:50:00 +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
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
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
43d53ca708
Remove redundant #ifdef. Reported by gnn@.
...
MFC after: 3 days
2012-06-21 12:51:24 +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
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
abe6735879
Use ECONNABORTED in cases where the ABORT was sent to the peer.
...
MFC after: 3 days
2012-05-13 16:56:16 +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
dfb886ebd0
Address clang warnings.
...
MFC after: 3 days
2012-05-06 14:50:54 +00:00
tuexen
189b3357e6
Remove debug code.
...
MFC after: 3 days
2012-05-06 11:37:41 +00:00
tuexen
fd59ebc4f0
Add support for SCTP_SEND_FAILED_EVENT as required by RFC 6458.
...
MFC after: 3 days
2012-05-06 11:02:53 +00:00
tuexen
668aa900bc
Do error checking for the SCTP_RESET_STREAMS, SCTP_RESET_ASSOC,
...
and SCTP_ADD_STREAMS socket options as specified by RFC 6525.
MFC after: 3 days
2012-05-05 14:06:15 +00:00
tuexen
6dac068475
Add support for the SCTP_ENABLE_STREAM_RESET socket option to
...
getsockopt(). This improves the support of RFC 6525.
MFC after: 3 days
2012-05-04 17:18:02 +00:00
tuexen
4ee7205a6e
Add support for SCTP_STREAM_CHANGE_EVENT, SCTP_ASSOC_RESET_EVENT as
...
required by RFC 6525. This also fixes SCTP_STREAM_RESET_EVENT.
MFC after: 3 days
2012-05-04 15:49:08 +00:00
tuexen
e42771f14b
Add support for missing gauth_number_of_chunks field. This Bug was
...
found by Irene Ruengeler.
MFC after: 1 week
2012-04-30 08:44:21 +00:00
tuexen
0f8fc5e936
Whitespace changes.
...
MFC after: 3 days
2012-04-28 16:32:49 +00:00
tuexen
62e631ede2
Whitespace changes.
...
MFC after: 3 days
2012-04-19 15:30:15 +00:00
tuexen
19af6e5d9d
Remove duplicate condition in if statement.
...
Obtained from: brucec@
MFC after: 3 days
2012-04-06 09:03:02 +00:00
rrs
ddfb5c5980
Make stream our stream reset implementation
...
compliant to RFC6525.
MFC after: 1 month
2012-03-29 13:36:53 +00:00
tuexen
52199a8cf4
Clean up, no functional change.
...
MFC after: 3 days.
2012-03-15 14:22:05 +00:00
tuexen
01e294b2fd
Remove two clang warnings.
...
MFC after: 1 month.
2012-02-18 16:06:15 +00:00
tuexen
f8b7dd3132
Fix two bugs, which result in a panic when calling getsockopt()
...
using SCTP_RECVINFO or SCTP_NXTINFO.
Reported by Clement Lecigne and forwarded to us by zi@.
MFC after: 3 days.
2012-01-14 09:10:20 +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
e98fa27d6f
Fix a bug reported by Irene Ruengeler which resulted in not sending
...
out HEARTBEATs when requested by the user. The HEARTBEATs were only
queued, but not actually sent out.
MFC after: 2 months.
2011-12-10 10:52:54 +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
7adf0c3790
Use the most significant 6 bits of the dscp instead of the least
...
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.
2011-10-11 13:24:37 +00:00
tuexen
680b9f90a2
Fix the enabling/disabling of Heartbeats and path MTU
...
discovery when using the SCTP_PEER_ADDR_PARAMS socket option.
Approved by: re
MFC after: 1 month.
2011-09-17 08:50:29 +00:00
tuexen
15bb2c985f
Make sure that SCTP rejects broadcast, multicast and wildcard addresses
...
as remote addresses.
Approved by: re
MFC after: 1 month.
2011-09-15 08:49:54 +00:00
tuexen
0e8ff918fb
Ensure that 1-to-1 style SCTP sockets can only be connected once.
...
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
2011-09-14 19:10:13 +00:00
tuexen
eab7de0c8f
Fix the handling of the flowlabel and DSCP value in the SCTP_PEER_ADDR_PARAMS
...
socket option.
Honor the net.inet6.ip6.auto_flowlabel sysctl setting.
Approved by: re (bz)
MFC after: 1 month.
2011-09-14 08:15:21 +00:00
tuexen
c040d5dff3
Fix the handling of [gs]etsockopt() unconnected 1-to-1 style sockets.
...
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.
2011-08-16 21:04:18 +00:00
tuexen
2a294422d7
Add support for the spp_dscp field in the SCTP_PEER_ADDR_PARAMS
...
socket option. Backwards compatibility is provided by still
supporting the spp_ipv4_tos field.
Approved by: re@
MFC after: 2 months.
2011-08-14 20:55:32 +00:00
tuexen
f47c615e88
The result of a joint work between rrs@ and myself at the IETF:
...
* 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.
2011-08-03 20:21:00 +00:00
tuexen
dfe16c28d3
Add the missing sca_keylength field to the sctp_authkey structure,
...
which is used the the SCTP_AUTH_KEY socket option.
MFC after: 1 month.
2011-06-30 16:56:55 +00:00
tuexen
b127ed6f91
Add SCTP_DEFAULT_PRINFO socket option.
...
Fix the SCTP_DEFAULT_SNDINFO socket option: Don't clear the
PR SCTP policy when setting sinfo_flags.
MFC after: 1 month.
2011-06-16 21:12:36 +00:00