History log of /freebsd-10-stable/sys/netinet/sctp_usrreq.c
Revision Date Author Comments
# 294222 17-Jan-2016 tuexen

MFC r293913:
Fail the SCTP_GET_ASSOC_NUMBER and SCTP_GET_ASSOC_ID_LIST
socket options for 1-to-1 style sockets as specified in RFC 6458.


# 294215 17-Jan-2016 tuexen

MFC r291904:
Fix the allocation of outgoing streams:
* When processing a cookie, use the number of
streams announced in the INIT-ACK.
* When sending an INIT-ACK for an existing
association, use the value from the association,
not from the end-point.


# 294206 17-Jan-2016 tuexen

MFC r291376:
When the sending of an SCTP outgoing stream reset request fails,
don't report it to the user since all stream have been marked
as pending.


# 294187 16-Jan-2016 tuexen

MFC r291141:
Fix the handling of IPSec policies in the SCTP stack. At least
make sure they are not leaked...


# 294185 16-Jan-2016 tuexen

MFC r291138:
Clear the so_pcb pointer in case of ipsec_init_policy() fails.


# 294184 16-Jan-2016 tuexen

MFC r291137:
Don't send SHUTDOWN chunk when the association is in a front state
and the applications calls shutdown(..., SHUT_WR) or
shutdown(..., SHUT_RDWR).


# 294182 16-Jan-2016 tuexen

MFC r291078:
Fix a bug where an SCTP association was moved back to SHUTDOWN_SENT
state when the user issued a shutdown() call.


# 294174 16-Jan-2016 tuexen

MFC r289570:
Use __func__ instead of __FUNCTION__.

This allows to compile the userland stack without errors using gcc5.
Thanks to saghul for makeing me aware and providing the patch.


# 294149 16-Jan-2016 tuexen

MFC r287282:
Fix the exporting of SCTP association states to userland. Without this,
associations in SHUTDOWN-PENDING were never reported correctly.


# 294141 16-Jan-2016 tuexen

MFC r285837, r285838
Fix an issue with MAC OS locking and also optimize the case
where we are sending back a stream-reset and a sack timer is running, in
that case we should just send the SACK.
Fix silly syntax error emacs chugged in for me.. gesh.


# 294140 16-Jan-2016 tuexen

MFC r285792:
Fix several problems with Stream Reset.
1) We were not handling (or sending) the IN_PROGRESS case if
the other side (or our side) was not able to reset (awaiting more data).
2) We would improperly send a stream-reset when we should not. Not
waiting until the TSN had been assigned when data was inqueue.


# 284693 22-Jun-2015 tuexen

MFC r284596:
When setting the primary address, return an error whenever it fails.


# 284633 20-Jun-2015 tuexen

MFC r284515:
Add FIB support for SCTP.
This fixes https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=200379

PR: 200379


# 284440 16-Jun-2015 tuexen

MFC r284332:

Fix the reporting of the PMTUD state for specific paths.


# 283829 31-May-2015 tuexen

MFC r283666:

Report the MTU consistently as specified in
https://tools.ietf.org/html/rfc6458
Thanks to Irene Ruengeler for helping me to fix this bug.


# 283822 31-May-2015 tuexen

MFC r283650:

Fix and cleanup the debug information. This has no user-visible changes.
Thanks to Irene Ruengeler for proving a patch.


# 283733 29-May-2015 tuexen

MFC r280634:

Use the reference count of the right SCTP inp.
Joint work with rrs@


# 283732 29-May-2015 tuexen

MFC r280459:

Fix two bugs which resulted in a screwed up end point list:
* Use a save way to walk throught a list while manipulting it.
* Have to appropiate locks in place.
Joint work with rrs@


# 283729 29-May-2015 tuexen

MFC r280404:

When an ICMP message is received and the MTU shrinks, only
mark outstanding chunks for retransmissions.


# 283727 29-May-2015 tuexen

MFC r279886:

Fix the adaptation of the path state when thresholds are changed
using the SCTP_PEER_ADDR_THLDS socket option.


# 283725 29-May-2015 tuexen

MFC r279863:

Unlock the stcb when using setsockopt() for the SCTP_PEER_ADDR_THLDS option.


# 283724 29-May-2015 tuexen

MFC r279859:

Add a SCTP socket option to limit the cwnd for each path.


# 283722 29-May-2015 tuexen

MFC r277815:

Whitespace change.


# 283716 29-May-2015 tuexen

MFC r277337:

Remove an unused variable.

Reported by: Coverity
CID: 750999


# 283706 29-May-2015 tuexen

MFC r275967:

Fix and harmonize the validation of PR-SCTP policies.

Reported by: Coverity
CID: 1232044


# 283705 29-May-2015 tuexen

MFC r275954:

Cleanup the code.

Reported by: Coverity
CID: 1232003


# 283699 29-May-2015 tuexen

MFC r275567:

Fix the support of mapped IPv4 addresses.
Thanks to Mark Bonnekessel and Markus Boese for making me aware of the
problems.


# 277807 27-Jan-2015 delphij

Fix SCTP SCTP_SS_VALUE kernel memory corruption and disclosure vulnerability
and SCTP stream reset vulnerability.

Security: FreeBSD-SA-15:02.kmem
Security: CVE-2014-8612
Security: FreeBSD-SA-15:03.sctp
Security: CVE-2014-8613


# 273000 12-Oct-2014 tuexen

MFC r272750:
Ensure that the number of stream reported in srs_number_streams is
consistent with the amount of data provided in the SCTP_RESET_STREAMS
socket option.
Thanks to Peter Bostroem from Google for drawing my attention to
this part of the code.


# 271750 18-Sep-2014 tuexen

MFC r271643:
Chunk IDs are 8 bit entities, not 16 bit.
Thanks to Peter Kasting from Google for drawing
my attention to it.

MFC r271665:
The MTU is handled as a 32-bit entity within the SCTP stack.
This was reported by Peter Kasting from Google.

MFC r271670:
Make a type conversion explicit. When compiling this code on
Windows as part of the SCTP userland stack, this fixes a
warning reported by Peter Kasting from Google.

MFC r271672:
Small cleanup which addresses a warning regaring the truncation
of a 64-bit entity to a 32-bit entity. This issue was reported by
Peter Kasting from Google.

MFC r271673:
Use a consistent type for the number of HMAC algorithms.
This fixes a bug which resulted in a warning on the userland
stack, when compiled on Windows.
Thanks to Peter Kasting from Google for reporting the issue and
provinding a potential fix.

MFC r271674:
Add a explict cast to silence a warning when building
the userland stack on Windows.
This issue was reported by Peter Kasting from Google.

Approved by: re (kib)


# 271746 18-Sep-2014 tuexen

MFC r270673:
Announce SCTP support in the kern.features sysctl variables.

MFC r270859:
Enable SCTP support. It runs perfectly fine on a Wandboard quad.

MFC r271204 with manual intervention:
Fix the handling of sysctl variables when used with VIMAGE.
While there do some cleanup of the code.

MFC r271209:
Fix a leak of an address, if the address is scheduled for removal
and the stack is torn down.
Thanks to Peter Bostroem and Jiayang Liu from Google for reporting the
issue.

MFC r271219:
Use SYSCTL_PROC instead of SYSCTL_VNET_PROC.
Suggested by: glebius@

MFC r271221:
Use union sctp_sockstore instead of struct sockaddr_storage. This
eliminates some warnings when building in userland.
Thanks to Patrick Laimbock for reporting this issue.
Remove also some unnecessary casts.
There should be no functional change.

MFC r271228:
Address another warnings reported by Patrick Laimbock when compiling
in userspace. While there, improve consistency.

MFC r271230:
Address warnings generated by the clang analyzer.

Approved by: re (kib)


# 270363 22-Aug-2014 tuexen

MFC r269945:

Add support for the SCTP_PR_STREAM_STATUS and SCTP_PR_ASSOC_STATUS
socket options. This includes managing the correspoing stat counters.
Add the SCTP_DETAILED_STR_STATS kernel option to control per policy
counters on every stream. The default is off and only an aggregated
counter is available. This is sufficient for the RTCWeb usecase.


# 270362 22-Aug-2014 tuexen

MFC r269858:

Add support for the SCTP_AUTH_SUPPORTED and SCTP_ASCONF_SUPPORTED
socket options. Add also a sysctl to control the support of ASCONF.


# 270361 22-Aug-2014 tuexen

MFC r269527:

Add support for the SCTP_RECONFIG_SUPPORTED and the corresponding
sysctl controlling the negotiation of the RE-CONFIG extension.


# 270360 22-Aug-2014 tuexen

MFC r269481:

Add support for the SCTP_PKTDROP_SUPPORTED socket option and
the corresponding sysctl variable.
The default is off, since the specification is not an RFC yet.


# 270359 22-Aug-2014 tuexen

MFC r269475:

Add SCTP socket option SCTP_NRSACK_SUPPORTED to control the
NRSACK extension. The default will still be off, since it
it not an RFC (yet).
Changing the sysctl name will be in a separate commit.


# 270357 22-Aug-2014 tuexen

MFC r269448:

Add support for the SCTP_PR_SUPPORTED socket option as specified in
http://tools.ietf.org/html/draft-ietf-tsvwg-sctp-prpolicies
Add also a sysctl controlling the default of the end-points.


# 270356 22-Aug-2014 tuexen

MFC r269436, r269445:

Cleanup the ECN configuration handling and provide an SCTP socket
option for controlling ECN on future associations and get the
status on current associations.
A simialar pattern will be used for controlling SCTP extensions in
upcoming commits.


# 270350 22-Aug-2014 tuexen

MFC r268526:

Integrate upstream changes.


# 267771 23-Jun-2014 tuexen

MFC r267688:

Fix a bug which incorrectly allowed two listening SCTP sockets on
the same port bound to the wildcard address.


# 267770 23-Jun-2014 tuexen

MFC r267682:

Fix a bug in the setsockopt()-handling of the SCTP
specific option SCTP_PEER_ADDR_THLDS: Use the
provided address as intended.


# 267769 23-Jun-2014 tuexen

MFC r267674:

Honor jails for unbound SCTP sockets when selecting source addresses,
reporting IP-addresses to the peer during the handshake, adding
addresses to the host, reporting the addresses via the sysctl
interface (used by netstat, for example) and reporting the
addresses to the application via socket options.
This issue was reported by Bernd Walter.


# 267723 22-Jun-2014 tuexen

MFC r263237:

* 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@.


# 260426 07-Jan-2014 tuexen

MFC r259943:

Address some warnings which showed up on the userland version.


# 258454 21-Nov-2013 tuexen

MFC r256556:
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@


# 284693 22-Jun-2015 tuexen

MFC r284596:
When setting the primary address, return an error whenever it fails.


# 284633 20-Jun-2015 tuexen

MFC r284515:
Add FIB support for SCTP.
This fixes https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=200379

PR: 200379


# 284440 16-Jun-2015 tuexen

MFC r284332:

Fix the reporting of the PMTUD state for specific paths.


# 283829 31-May-2015 tuexen

MFC r283666:

Report the MTU consistently as specified in
https://tools.ietf.org/html/rfc6458
Thanks to Irene Ruengeler for helping me to fix this bug.


# 283822 31-May-2015 tuexen

MFC r283650:

Fix and cleanup the debug information. This has no user-visible changes.
Thanks to Irene Ruengeler for proving a patch.


# 283733 29-May-2015 tuexen

MFC r280634:

Use the reference count of the right SCTP inp.
Joint work with rrs@


# 283732 29-May-2015 tuexen

MFC r280459:

Fix two bugs which resulted in a screwed up end point list:
* Use a save way to walk throught a list while manipulting it.
* Have to appropiate locks in place.
Joint work with rrs@


# 283729 29-May-2015 tuexen

MFC r280404:

When an ICMP message is received and the MTU shrinks, only
mark outstanding chunks for retransmissions.


# 283727 29-May-2015 tuexen

MFC r279886:

Fix the adaptation of the path state when thresholds are changed
using the SCTP_PEER_ADDR_THLDS socket option.


# 283725 29-May-2015 tuexen

MFC r279863:

Unlock the stcb when using setsockopt() for the SCTP_PEER_ADDR_THLDS option.


# 283724 29-May-2015 tuexen

MFC r279859:

Add a SCTP socket option to limit the cwnd for each path.


# 283722 29-May-2015 tuexen

MFC r277815:

Whitespace change.


# 283716 29-May-2015 tuexen

MFC r277337:

Remove an unused variable.

Reported by: Coverity
CID: 750999


# 283706 29-May-2015 tuexen

MFC r275967:

Fix and harmonize the validation of PR-SCTP policies.

Reported by: Coverity
CID: 1232044


# 283705 29-May-2015 tuexen

MFC r275954:

Cleanup the code.

Reported by: Coverity
CID: 1232003


# 283699 29-May-2015 tuexen

MFC r275567:

Fix the support of mapped IPv4 addresses.
Thanks to Mark Bonnekessel and Markus Boese for making me aware of the
problems.


# 277807 27-Jan-2015 delphij

Fix SCTP SCTP_SS_VALUE kernel memory corruption and disclosure vulnerability
and SCTP stream reset vulnerability.

Security: FreeBSD-SA-15:02.kmem
Security: CVE-2014-8612
Security: FreeBSD-SA-15:03.sctp
Security: CVE-2014-8613


# 273000 12-Oct-2014 tuexen

MFC r272750:
Ensure that the number of stream reported in srs_number_streams is
consistent with the amount of data provided in the SCTP_RESET_STREAMS
socket option.
Thanks to Peter Bostroem from Google for drawing my attention to
this part of the code.


# 271750 18-Sep-2014 tuexen

MFC r271643:
Chunk IDs are 8 bit entities, not 16 bit.
Thanks to Peter Kasting from Google for drawing
my attention to it.

MFC r271665:
The MTU is handled as a 32-bit entity within the SCTP stack.
This was reported by Peter Kasting from Google.

MFC r271670:
Make a type conversion explicit. When compiling this code on
Windows as part of the SCTP userland stack, this fixes a
warning reported by Peter Kasting from Google.

MFC r271672:
Small cleanup which addresses a warning regaring the truncation
of a 64-bit entity to a 32-bit entity. This issue was reported by
Peter Kasting from Google.

MFC r271673:
Use a consistent type for the number of HMAC algorithms.
This fixes a bug which resulted in a warning on the userland
stack, when compiled on Windows.
Thanks to Peter Kasting from Google for reporting the issue and
provinding a potential fix.

MFC r271674:
Add a explict cast to silence a warning when building
the userland stack on Windows.
This issue was reported by Peter Kasting from Google.

Approved by: re (kib)


# 271746 18-Sep-2014 tuexen

MFC r270673:
Announce SCTP support in the kern.features sysctl variables.

MFC r270859:
Enable SCTP support. It runs perfectly fine on a Wandboard quad.

MFC r271204 with manual intervention:
Fix the handling of sysctl variables when used with VIMAGE.
While there do some cleanup of the code.

MFC r271209:
Fix a leak of an address, if the address is scheduled for removal
and the stack is torn down.
Thanks to Peter Bostroem and Jiayang Liu from Google for reporting the
issue.

MFC r271219:
Use SYSCTL_PROC instead of SYSCTL_VNET_PROC.
Suggested by: glebius@

MFC r271221:
Use union sctp_sockstore instead of struct sockaddr_storage. This
eliminates some warnings when building in userland.
Thanks to Patrick Laimbock for reporting this issue.
Remove also some unnecessary casts.
There should be no functional change.

MFC r271228:
Address another warnings reported by Patrick Laimbock when compiling
in userspace. While there, improve consistency.

MFC r271230:
Address warnings generated by the clang analyzer.

Approved by: re (kib)


# 270363 22-Aug-2014 tuexen

MFC r269945:

Add support for the SCTP_PR_STREAM_STATUS and SCTP_PR_ASSOC_STATUS
socket options. This includes managing the correspoing stat counters.
Add the SCTP_DETAILED_STR_STATS kernel option to control per policy
counters on every stream. The default is off and only an aggregated
counter is available. This is sufficient for the RTCWeb usecase.


# 270362 22-Aug-2014 tuexen

MFC r269858:

Add support for the SCTP_AUTH_SUPPORTED and SCTP_ASCONF_SUPPORTED
socket options. Add also a sysctl to control the support of ASCONF.


# 270361 22-Aug-2014 tuexen

MFC r269527:

Add support for the SCTP_RECONFIG_SUPPORTED and the corresponding
sysctl controlling the negotiation of the RE-CONFIG extension.


# 270360 22-Aug-2014 tuexen

MFC r269481:

Add support for the SCTP_PKTDROP_SUPPORTED socket option and
the corresponding sysctl variable.
The default is off, since the specification is not an RFC yet.


# 270359 22-Aug-2014 tuexen

MFC r269475:

Add SCTP socket option SCTP_NRSACK_SUPPORTED to control the
NRSACK extension. The default will still be off, since it
it not an RFC (yet).
Changing the sysctl name will be in a separate commit.


# 270357 22-Aug-2014 tuexen

MFC r269448:

Add support for the SCTP_PR_SUPPORTED socket option as specified in
http://tools.ietf.org/html/draft-ietf-tsvwg-sctp-prpolicies
Add also a sysctl controlling the default of the end-points.


# 270356 22-Aug-2014 tuexen

MFC r269436, r269445:

Cleanup the ECN configuration handling and provide an SCTP socket
option for controlling ECN on future associations and get the
status on current associations.
A simialar pattern will be used for controlling SCTP extensions in
upcoming commits.


# 270350 22-Aug-2014 tuexen

MFC r268526:

Integrate upstream changes.


# 267771 23-Jun-2014 tuexen

MFC r267688:

Fix a bug which incorrectly allowed two listening SCTP sockets on
the same port bound to the wildcard address.


# 267770 23-Jun-2014 tuexen

MFC r267682:

Fix a bug in the setsockopt()-handling of the SCTP
specific option SCTP_PEER_ADDR_THLDS: Use the
provided address as intended.


# 267769 23-Jun-2014 tuexen

MFC r267674:

Honor jails for unbound SCTP sockets when selecting source addresses,
reporting IP-addresses to the peer during the handshake, adding
addresses to the host, reporting the addresses via the sysctl
interface (used by netstat, for example) and reporting the
addresses to the application via socket options.
This issue was reported by Bernd Walter.


# 267723 22-Jun-2014 tuexen

MFC r263237:

* 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@.


# 260426 07-Jan-2014 tuexen

MFC r259943:

Address some warnings which showed up on the userland version.


# 258454 21-Nov-2013 tuexen

MFC r256556:
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@