Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix association id of unordered send setopts in diameter_sctp
The call to inet:setopts/2 to request unordered delivery did not set assoc_id, and gen_sctp(3) documents the default 0 in this case as meaning the whole endpoint, which was not the intention. The result was either too much unordered or too little, depending on the use case, but exactly what the behaviour is on different OSes is a little unclear. What's clear is that it was wrong. RFC 6458 defines constants SCTP_FUTURE_ASSOC, SCTP_CURRENT_ASSOC, and SCTP_ALL_ASSOC here: https://tools.ietf.org/html/rfc6458#section-7.2 It doesn't assign numeric values however, so 0 in gen_sctp doesn't necessarily have the same meaning as the 0 that Linux (for one) defines as SCTP_FUTURE_ASSOC for example. Besides, association ids are documented as opaque by gen_sctp(3), so even setting 0 explicitly is questionable. Better to simply specify the association id that gen_sctp has communicated in the sctp_assoc_change comm_up event. Last visited in commit d382952. Originally bungled in commit 0447bd6. Thanks to Andreas Schultz.
- Loading branch information