aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorCy Schubert <cy@FreeBSD.org>2021-12-02 22:45:04 +0000
committerCy Schubert <cy@FreeBSD.org>2021-12-02 22:45:04 +0000
commitdb0ac6ded61105caab4700aeac255328d4238dc4 (patch)
tree1ecb794fd4e9d2076de2fdd040b4fe0335f2b89e /lib
parent266f97b5e9a7958e365e78288616a459b40d924a (diff)
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/net/sctp_sys_calls.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/libc/net/sctp_sys_calls.c b/lib/libc/net/sctp_sys_calls.c
index 615b14ede5aa..7c3652ff5d3c 100644
--- a/lib/libc/net/sctp_sys_calls.c
+++ b/lib/libc/net/sctp_sys_calls.c
@@ -405,7 +405,11 @@ sctp_getpaddrs(int sd, sctp_assoc_t id, struct sockaddr **raddrs)
opt_len = (socklen_t)sizeof(uint32_t);
if (getsockopt(sd, IPPROTO_SCTP, SCTP_GET_REMOTE_ADDR_SIZE,
&size_of_addresses, &opt_len) != 0) {
- return (-1);
+ if (errno == ENOENT) {
+ return (0);
+ } else {
+ return (-1);
+ }
}
opt_len = (socklen_t)((size_t)size_of_addresses + sizeof(struct sctp_getaddresses));
addrs = calloc(1, (size_t)opt_len);