From nobody Fri Dec 10 10:28:49 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id E131018D4037; Fri, 10 Dec 2021 10:28:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J9Rvj4XKCz4tHg; Fri, 10 Dec 2021 10:28:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7B56F18C9E; Fri, 10 Dec 2021 10:28:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1BAASnqR092497; Fri, 10 Dec 2021 10:28:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1BAASnZg092496; Fri, 10 Dec 2021 10:28:49 GMT (envelope-from git) Date: Fri, 10 Dec 2021 10:28:49 GMT Message-Id: <202112101028.1BAASnZg092496@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 4749d55fb3f1 - stable/13 - libc sctp: improve error reporting of sctp_getladdrs() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 4749d55fb3f1d6c2933486cbf1a19c33e2161f32 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1639132129; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lYwT1iVSqaVassiPuCk3sAAOAtLxOJu7gLzsrHtHJ7I=; b=Wb4zMmhL3UXm0rT+2s3wqHO4K/VkJYvpYedwByEL9wa86IKGjU3VceShnRbNg3/yeidSzr PhpoP+gOufaOXH17BHYI2oyc9yx24Hgi+56+jzFmTbNCn8KR7aUB/56SLmnZTPVp/o44az 5wq9QU6FkpXNTCeLxF/IAjctq0xmi5aGEcMWI0yLZD/pzF9KC8TseU6hvAipEZlSQrU+cz sfBhPbxf/DBn897rbIvkYZyUeD+d0r+gZExnFtc6qH0vXZZM56c2jqpoiDrTh/MI8+XEI2 zxHi2XPfW22x47PyBsmfn/mUuVFQBnYyC0c3rfPSVPIr1J1ONsR3fUYR3xLxdg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1639132129; a=rsa-sha256; cv=none; b=de5KSvNRusllnFexXa6aFFPBAVrhcMurdGRTPVqgkAZ8CTE9xORez3It7DsRZUQpQvYU6E i3AgzNFiBvLQHVTHfWneSnlAIcS0TnHL8r7HaLnROrB0uwVELw6VRjcNxe/1w/mruP1ene 9uge6T3uc+qBdkC0V4cEDIqE9PL59XvK3IvDkstfF3TClQU6IG2kQgvWNYCelMdtcvk2Sd NadTH2mPibFwZbGI7xrnNmkR3jsydjOZWDtI8hPsn6PmGvSn+zXuoFnOJwBlbblUcfh5Yu bvdcMRioATGv7JA7dpOtcapTkuu4/xX0Fr+9n/+icXbPXhlnw62EW+WsA3RHXg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=4749d55fb3f1d6c2933486cbf1a19c33e2161f32 commit 4749d55fb3f1d6c2933486cbf1a19c33e2161f32 Author: Michael Tuexen AuthorDate: 2021-12-01 10:14:36 +0000 Commit: Michael Tuexen CommitDate: 2021-12-10 10:26:31 +0000 libc sctp: improve error reporting of sctp_getladdrs() Do not hide errno from getsockopt() called internally. MFC after: 1 week (cherry picked from commit 6e9309bd3b04501b69593900a14e01114c7f2404) --- lib/libc/net/sctp_sys_calls.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/libc/net/sctp_sys_calls.c b/lib/libc/net/sctp_sys_calls.c index 5acb957c3d3f..3249eeaa4c4e 100644 --- a/lib/libc/net/sctp_sys_calls.c +++ b/lib/libc/net/sctp_sys_calls.c @@ -460,7 +460,6 @@ sctp_getladdrs(int sd, sctp_assoc_t id, struct sockaddr **raddrs) opt_len = (socklen_t)sizeof(uint32_t); if (getsockopt(sd, IPPROTO_SCTP, SCTP_GET_LOCAL_ADDR_SIZE, &size_of_addresses, &opt_len) != 0) { - errno = ENOMEM; return (-1); } if (size_of_addresses == 0) { @@ -478,7 +477,6 @@ sctp_getladdrs(int sd, sctp_assoc_t id, struct sockaddr **raddrs) if (getsockopt(sd, IPPROTO_SCTP, SCTP_GET_LOCAL_ADDRESSES, addrs, &opt_len) != 0) { free(addrs); - errno = ENOMEM; return (-1); } *raddrs = &addrs->addr[0].sa;