Michael Tuexen
dd294dcec6
Using %p in a format string requires a void *.
...
MFC after: 10 days
2012-09-05 18:52:01 +00:00
Michael Tuexen
2899aa8f65
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
Michael Tuexen
5e20b91dbe
Changes which improve compilation if neither INET nor INET6 is defined.
...
MFC after: 3 days
2012-07-15 20:16:17 +00:00
Michael Tuexen
e0e00a4d0f
#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
Michael Tuexen
5db75fc724
Fix a bug introduced in r237715.
...
MFC after:i 3 days.
2012-07-09 10:59:39 +00:00
Michael Tuexen
1ebccfd0a2
Use consistent method to determine IPV4_OUTPUT/IPV6_OUTPUT.
...
MFC after: 3 days
2012-07-04 20:59:30 +00:00
Michael Tuexen
c76b949968
Use CSUM_SCTP_IPV6 for IPv6.
...
MFC after: 3 days
2012-07-04 20:29:16 +00:00
Gleb Smirnoff
bf9840512a
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
Michael Tuexen
d8d544892c
Remove dead code (on FreeBSD) as suggested by glebius@.
...
MFC after: 3 days
2012-07-02 16:40:11 +00:00
Michael Tuexen
b1754ad17b
Pass the src and dst address of a received packet explicitly around.
...
MFC after: 3 days
2012-06-28 16:01:08 +00:00
Michael Tuexen
39803b8c58
Whitespace cleanup.
...
MFC after: 3 days
2012-06-25 17:15:09 +00:00
Michael Tuexen
20cc2188f3
Pass the packet length explicitly around.
...
MFC after: 3 days
2012-06-24 23:12:24 +00:00
Michael Tuexen
f938425253
Do packet logging in a consistent way.
...
MFC after: 3 days
2012-06-24 21:25:54 +00:00
Michael Tuexen
f30ac43257
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
Michael Tuexen
c9e089587c
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
Michael Tuexen
2566e071ec
Honor sysctl for TTL.
...
MFC after: 3 days
2012-06-02 21:22:26 +00:00
Michael Tuexen
962cef4089
Don't request data from the IPv6 layer, which is not used.
...
MFC after: 3 days
2012-06-02 20:53:23 +00:00
Michael Tuexen
a6cff10f2a
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
Michael Tuexen
8d9638ab33
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
Michael Tuexen
807aad636f
Use consistent text at the begining of the files.
...
MFC after: 3 days
2012-05-23 11:26:28 +00:00
Michael Tuexen
8b42cfa708
Support SCTP_EOF also for 1-to-1 style sockets.
...
MFC after: 3 days
2012-05-17 17:02:47 +00:00
Michael Tuexen
1edc9dbae5
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
Michael Tuexen
4b1f78e1af
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
Michael Tuexen
a2b42326b5
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
Michael Tuexen
cd3fd53188
Use SCTP_PRINTF() instead of printf() in all SCTP sources.
...
MFC after: 3 days
2012-05-04 09:27:00 +00:00
Michael Tuexen
254945d75a
Fix another RFC 6458 issue. Spotted by Irene Ruengeler.
...
MFC after: 3 days
2012-05-03 10:26:33 +00:00
Michael Tuexen
74b2fab47a
Use the same pattern for mbuf logging everywhere.
...
MFC after: 3 days
2012-04-19 13:11:17 +00:00
Randall Stewart
c4e848b770
Make stream our stream reset implementation
...
compliant to RFC6525.
MFC after: 1 month
2012-03-29 13:36:53 +00:00
Michael Tuexen
86e4703fa6
Honor the net.inet.udp.checksum sysctl when using SCTP/UDP/IPv4
...
encapsulation.
MFCing requires MFCing http://svn.freebsd.org/changeset/base/233554
MFC after: 2 weeks
2012-03-28 08:11:46 +00:00
Michael Tuexen
9b1246ca38
Fix a bug where the wrong protocol overhead was used. This can lead
...
to a deadlock of an association when an IPv6 socket was used to
communcate with IPv4 and an ICMPv4 fragmentation needed message
was received.
While there, simplify the code a bit.
MFC after: 3 days.
2012-02-14 12:00:34 +00:00
Michael Tuexen
86eef6072b
Two cleanups. No functional change.
2012-01-15 13:35:55 +00:00
John Baldwin
3b0b2840be
Use queue(3) macros instead of home-rolled versions in several places in
...
the INET6 code. This includes retiring the 'ndpr_next' and 'pfr_next'
macros.
Submitted by: pluknet (earlier version)
Reviewed by: pluknet
2011-12-29 18:25:18 +00:00
Michael Tuexen
60990c0c06
Address issues found by clang. While there, fix also some style
...
issues.
MFC after: 3 months.
2011-12-27 10:16:24 +00:00
Michael Tuexen
7215cc1b74
Fix unused parameter warnings.
...
While there, fix some whitespace issues.
MFC after: 3 months.
2011-12-17 19:21:40 +00:00
Michael Tuexen
70acddf158
Fix a warning reported by arundel@.
...
Fix a bug where the parameter length of a supported address types
parameter is set to a wrong value if the kernel is built with
with either INET or INET6, but not both.
MFC after: 3 days.
2011-11-27 17:51:13 +00:00
Michael Tuexen
c9c5805975
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
Michael Tuexen
7dd1259f73
Initialize all components of the sent COOKIE.
...
MFC after: 3 days.
2011-11-06 20:09:22 +00:00
Michael Tuexen
a0fe4c5b36
Send out control chunks which have no specific destination.
...
MFC after: 3 days.
2011-10-27 22:37:59 +00:00
Michael Tuexen
92776dfd5a
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
Michael Tuexen
c55b70cef6
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
Michael Tuexen
58bdb69150
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
Michael Tuexen
e4f820b3c6
Improve implementation of the Nagle algorithm for SCTP:
...
Don't delay the final fragment of a fragmented user message.
Approved by: re
MFC after: 4 weeks
2011-09-09 13:52:37 +00:00
Michael Tuexen
b10f2dc889
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
Michael Tuexen
ca85e9482a
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
Michael Tuexen
e2e7c62edc
Add support for the newly added SCTP API.
...
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.
2011-06-15 23:50:27 +00:00
Michael Tuexen
b7e08865e8
Unbreak INET-less build.
...
Reported by bz@
MFC after: 1 week
2011-05-18 19:49:39 +00:00
Michael Tuexen
c954cac48b
Fix whitespacing.
...
Reported by scf@
MFC after: 1 week.
2011-05-17 15:46:28 +00:00
Michael Tuexen
96f4bcfff2
Fix the source address selection for boundall sockets
...
when sending INITs to a global IPv4 address having
only private IPv4 address.
Allow the usage of a private address and make sure
that no other private address will be used by the
association.
Initial work was done by rrs@.
MFC after: 1 week.
2011-05-14 18:22:14 +00:00
Michael Tuexen
689e6a5fa3
Fix a locking issue showing up on Mac OS X when subscribing to
...
authentication events. DTLS/SCTP renegotiations trigger the bug.
MFC after: 2 weeks.
2011-05-08 09:11:59 +00:00
Michael Tuexen
e6194c2ed4
Improve compilation of SCTP code without INET support.
...
Some bugs where fixed while doing this:
* ASCONF-ACK messages might use wrong port number when using
IPv6.
* Checking for additional addresses takes the correct address
into account and also does not do more comparisons than
necessary.
This patch is based on one received from bz@ who was
sponsored by The FreeBSD Foundation and iXsystems.
MFC after: 1 week
2011-04-30 11:18:16 +00:00