HomeFreeBSD

libc sctp: fix sctp_getladdrs() when reporting no addresses

Description

libc sctp: fix sctp_getladdrs() when reporting no addresses

Section 9.5 of RFC 6458 (SCTP Socket API) requires that
sctp_getladdrs() returns 0 in case the socket is unbound. This
is the cause of reporting 0 addresses. So don't indicate an
error, just report this case as required.

PR: 260117
MFC after: 1 week

(cherry picked from commit 071966e874ed472bdac031b7e89d08bacf8bbbc4)

Details

Provenance
tuexenAuthored on Dec 1 2021, 3:20 PM
Parents
rG70d91ea04cd5: sctp: improve handling of assoc ids in socket options
Branches
Unknown
Tags
Unknown