]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
libc sctp: fix sctp_getladdrs() when reporting no addresses
authorMichael Tuexen <tuexen@FreeBSD.org>
Wed, 1 Dec 2021 15:20:17 +0000 (16:20 +0100)
committerMichael Tuexen <tuexen@FreeBSD.org>
Fri, 10 Dec 2021 10:38:31 +0000 (11:38 +0100)
commit6a5487e34b13f9b7e184a4cca23b715a76f2a375
tree0468d3553ad082413a5470b7fce4af7d1e450ed0
parent70d91ea04cd5569ffd279e1f7088fe2bb3dbd390
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)
lib/libc/net/sctp_sys_calls.c