erlang/otp — pull request #552 by dotsimon (2014-12-03 00:02:08+00:00)
Title: Fix inet:getopts involving #sctp_paddrinfo{}

The current handling of SCTP peer address states is incomplete. Due to the (surprising) use of ASSERT this can lead to a hanging caller, or worse.

This patch:
* Handles peer addresses that are unconfirmed (i.e. in state SCTP_UNCONFIRMED).
* Handles unknown states instead of using ASSERT

*Note*: Under Linux the atoms returned in #sctp_status.state and #sctp_paddrinfo.state are unlikely to be correct. This is due to the unclever design decision to have the userland headers in a separate package (lksctp-tools) from the kernel sources. Although well beyond the scope of OTP, one could correct this behaviour by ensuring your build platform has `/usr/include/netinet/sctp.h` aligned with the kernel headers in `include/net/sctp`...