diff options
author | Michael Tuexen <tuexen@FreeBSD.org> | 2021-12-01 18:47:50 +0000 |
---|---|---|
committer | Michael Tuexen <tuexen@FreeBSD.org> | 2021-12-01 18:50:26 +0000 |
commit | 83a103ec429a6dd862a73857ebeeff863a41a34d (patch) | |
tree | 317bd23dfadf22efc31fbf032a0ad3fce1a6e638 /lib | |
parent | 94a72c5ac4285b2940e5d2c7e53d21c84023defc (diff) | |
download | src-83a103ec429a6dd862a73857ebeeff863a41a34d.tar.gz src-83a103ec429a6dd862a73857ebeeff863a41a34d.zip |
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/net/sctp_sys_calls.c | 6 |
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); |