| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When the SCTP, TCP, or UDP implementation send a packet, it does not
compute the corresponding checksum but defers that. The network layer
will determine whether the network interface selected for the packet
has the requested capability and computes the checksum in software,
if the selected network interface doesn't have the requested
capability.
Do this not only for packets being sent by the local SCTP, TCP,
and UDP stack, but also when forwarding packets. Furthermore, when
such packets are delivered to a local SCTP, TCP, or UDP stack, do not
compute or validate the checksum, since such packets never have been on
the wire.
This allows to support checksum offloading also in the case of local
virtual machines or jails.
Support for epair, vtnet, and tap interfaces will be added in
separate commits.
Reviewed by: kp, rgrimes, tuexen, manpages
MFC after: 4 weeks
Differential Revision: https://reviews.freebsd.org/D51475
|
|
|
|
|
|
|
| |
Reported by: Coverity Scan
CID: 1492349
CID: 1493281
MFC after: 3 days
|
|
|
|
|
|
|
|
|
| |
Right now, the code in process_chunk_drop() does not look the
the corresponding fields.
Therefore, no functional change intended.
Reported by: Coverity Scan
CID: 1472476
MFC after: 3 days
|
|
|
|
|
|
|
| |
If the peer announced support of zero checksums, do so when sending
packets containing an INIT ACK chunk.
MFC after: 1 week
|
|
|
|
|
|
|
| |
While there, improve consistency of the notification related code.
No functional change intended.
MFC after: 3 days
|
|
|
|
|
|
|
|
|
| |
When handling a SHUTDOWN or SHUTDOWN ACK chunk detect if the peer
is violating the protocol by not having made sure all user messages
are reveived by the peer. If this situation is detected, abort the
association.
MFC after: 1 week
|
|
|
|
|
|
|
| |
Fix an unused-but-set-variable warning for builds without INVARIANTS.
Reported by: O. Hartmann
MFC after: 1 week
|
|
|
|
|
|
|
|
|
|
|
| |
Don't handle a graceful shutdown of the peer as an implicit signal
that all partial messages are complete. First, this is not implemented
correctly and second this should not be done by the peer. It is more
appropriate to handle this as a protocol violation.
Remove the incorrect code and leave detecting the protocol violation
and its handling in a followup commit.
MFC after: 1 week
|
| |
|
|
|
|
| |
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
|
|
|
|
|
| |
Implement support for the error detection method identifier.
MFC after: 2 weeks
|
|
|
|
|
|
|
| |
The intention is to protect a malicious peer not following the
shutdown procedures.
MFC after: 1 week
|
|
|
|
|
|
|
|
| |
When shutdown(..., SHUT_WR) is called in the front states, send a
SHUTDOWN chunk when a COOKIE ACK chunk is received and there is
no outstanding data.
MFC after: 1 week
|
|
|
|
|
|
|
|
|
|
|
| |
* If a measure of staleness of 0 is reported, use the RTT instead.
* Ensure that we always send a cookie preservative parameter by
rounding up during the calculation.
* If allowed, perform a round trip time measurement.
* Clear the overall error counter, since the error cause also
acts like an ACK.
MFC after: 1 week
|
|
|
|
|
|
|
| |
Don't take RTT measurements on packets containing INIT or COOKIE-ECHO
chunks, when they were retransmitted.
MFC after: 1 week
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When receiving a cookie, the receiver does not know whether the
peer retransmitted the COOKIE-ECHO chunk or not. Therefore, don't
do an RTT measurement. It might be much too long.
To overcome this limitation, one could do at least two things:
1. Bundle the INIT-ACK chunk with a HEARTBEAT chunk for doing the
RTT measurement. But this is not allowed.
2. Add a flag to the COOKIE-ECHO chunk, which indicates that it
is the initial transmission, and not a retransmission. But
this requires an RFC.
MFC after: 1 week
|
|
|
|
|
|
|
| |
Enforce consistency between announcing 0-cksum support and actually
using it in the association. The value from the inp when the
INIT ACK is sent must be used, not the one from the inp when the
cookie is received.
|
| |
|
|
|
|
|
|
|
|
| |
Ensure that the initiate tag of the INIT-ACK chunk is used as the
verification tag of the packet containing the ABORT chunk.
Reported by: Suganya Dharma
MFC after: 1 week
|
|
|
|
|
|
|
| |
Use an atomic operation when the inp is not write locked.
Reported by: syzbot+bf27083e9a3f8fde8b4d@syzkaller.appspotmail.com
MFC after: 3 days
|
|
|
|
| |
MFC after: 3 days
|
|
|
|
|
|
| |
No functional change intended.
MFC after: 3 days
|
|
|
|
|
|
|
| |
Hold a refcount while giving up an stcp lock. This issue was
found by running syzkaller.
MFC after: 3 days
|
|
|
|
|
|
| |
Thanks to David Sanders for fixing the typos in the userland stack.
MFC after: 3 days
|
|
|
|
|
|
|
|
| |
Just use the stcb lock instead to simplify locking.
Reported by: syzbot+d00b202063150f85b110@syzkaller.appspotmail.com
Reported by: syzbot+87f268a0a6d2d6383306@syzkaller.appspotmail.com
MFC after: 3 days
|
|
|
|
| |
MFC after: 3 days
|
|
|
|
|
|
|
|
|
|
| |
Allow the resending of DATA chunks to be controlled by the caller,
which allows retiring sctp_mtu_size_reset() in a separate commit.
Also improve the computaion of the overhead and use 32-bit integers
consistently.
Thanks to Timo Voelker for pointing me to the code.
MFC after: 3 days
|
| |
|
|
|
|
|
|
| |
- s/assue/assume/
MFC after: 3 days
|
|
|
|
|
|
|
|
| |
Callers are getting the stcb send lock, so just KASSERT that.
No need to signal this when calling stream scheduler functions.
No functional change intended.
MFC after: 1 week
|
|
|
|
| |
MFC after: 1 week
|
|
|
|
|
|
|
| |
Don't lock the inp-info lock while holding an stcb lock.
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D31921
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
All callers of sctp_aloc_assoc() mark the PCB as connected after a
successful call (for one-to-one-style sockets). In all cases this is
done without the PCB lock, so the PCB's flags can be corrupted. We also
do not atomically check whether a one-to-one-style socket is a listening
socket, which violates various assumptions in solisten_proto().
We need to hold the PCB lock across all of sctp_aloc_assoc() to fix
this. In order to do that without introducing lock order reversals, we
have to hold the global info lock as well.
So:
- Convert sctp_aloc_assoc() so that the inp and info locks are
consistently held. It returns with the association lock held, as
before.
- Fix an apparent bug where we failed to remove an association from a
global hash if sctp_add_remote_addr() fails.
- sctp_select_a_tag() is called when initializing an association, and it
acquires the global info lock. To avoid lock recursion, push locking
into its callers.
- Introduce sctp_aloc_assoc_connected(), which atomically checks for a
listening socket and sets SCTP_PCB_FLAGS_CONNECTED.
There is still one edge case in sctp_process_cookie_new() where we do
not update PCB/socket state correctly.
Reviewed by: tuexen
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D31908
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This appears to be unused in usrsctp as well. No functional change
intended.
Reviewed by: tuexen
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D31812
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We previously did this only in the normal case where no association
exists yet. However, it is not safe to process COOKIE-ECHO even if an
association exists, as sctp_process_cookie_existing() may dereference
the socket pointer.
See also commit 0c7dc84076b64ef74c24f04400d572f75ef61bb4.
Reviewed by: tuexen
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D31755
|
|
|
|
| |
MFC after: 3 days
|
|
|
|
| |
MFC after: 3 days
|
|
|
|
|
|
|
| |
Do not report always ETIMEDOUT, but only when appropriate. In
other cases report ECONNABORTED.
MFC after: 3 days
|
|
|
|
|
| |
MFC after: 3 days
Reported by: Junseok Yang (for the userland stack)
|
|
|
|
| |
MFC after: 3 days
|
|
|
|
|
|
|
| |
Thanks to Tolya Korniltsev for reporting the issue for
the userland stack and testing the fix.
MFC after: 3 days
|
|
|
|
|
|
|
| |
Thanks to Taylor Brandstetter for finding the issue and providing
a patch for the userland stack.
MFC after: 3 days
|
|
|
|
| |
MFC after: 3 days
|
|
|
|
| |
MFC after: 3 days
|
|
|
|
|
|
|
| |
This fixes in particular a possible use after free bug reported
Anatoly Korniltsev and Taylor Brandstetter for the userland stack.
MFC after: 3 days
|
| |
|
|
|
|
|
|
|
|
| |
When processing INIT and INIT-ACK information, also during
COOKIE processing, delete the current association, when it
would end up in an inconsistent state.
MFC after: 3 days
|
|
|
|
|
| |
Just skip the chunk, if no other handling is required by the
specification.
|
| |
|