From nobody Thu Feb 01 21:44:44 2024 X-Original-To: dev-commits-src-main@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 4TQsrD6Spzz58knV; Thu, 1 Feb 2024 21:44:44 +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 4TQsrD5yY8z4jZ7; Thu, 1 Feb 2024 21:44:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706823884; 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=oXhOJ0ZPRUV4uFCAMBXd2yarRfI54tqz+6QzMljOpUc=; b=de9HI+OVQTy/Ey+xfCGGLsWh6xyB/AK/mu6u5LGhkc4O530Bt8WHyuAVDMdjx6OS6EVJY1 3Ez/K8i4uE95GShlAha4fgBTZkg563mh1eR9zujH0rjjiGzsov3iZ4lCrMc3HwP/LxjneI 8fbUb6nhQYT2GHNQrDg/iBNe+Ssx2Liv9Kal1nXITlSzljPo0jp6Af53E8y6rE4CXj8bat 3AVoD321q+dHVzuU8lHFiZnkAXKjTKlRbxtKOLTCa9v5PFSKQ6vJ1568+JAEf4DEO5XK8P nCcHYVom38aaK2MxGWlOdjeNPTdD4OeggXzpn4rRr6fJI5VW4JZfGrKlI5JnVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706823884; 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=oXhOJ0ZPRUV4uFCAMBXd2yarRfI54tqz+6QzMljOpUc=; b=jRfgQu5XIMWWa3hSWtEUcMSxm2DehbMO1FpJuw454iwVj5e6B+KtS+m9+r5R5D9gngVcKu ZyzTihoM34EL/sbSqqgiq2eBA3Bv0yHs8O4SnSUjCHsm9KXMt0vys/gV4JFf3uW9b5qdW6 Vzy5HTJiuj6iye6LmEA+kvXY0/fCWX+kQX3qFLLZ7qASJ6/xpCIV+v+agwP67URxBvH0Sf FWa923cGJ7YMVDM4zXHThqkM6CUu8RKVIXYOb4j9Hupuf77mkw6oU5Mr/aWeHzsBcXBHy+ 7zDwagxnViK8RaGmd1rnHyTA4tu8DdYfMAAV6Sxu5VHr+fVmM/MHZ1SzfAnbhg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706823884; a=rsa-sha256; cv=none; b=XQBnNLubgBkDT+3KOJx59CLfyTmNKenMBHvNMpJI8MBCs2vdeCmi4ThFdQFxJ2clI6dutt e+/pD3wn1koTI/SmaYFcoD/a91m0zqr9Zzg8xJXtXimyxuey3qOqfKwLd0yWMjrEB8GgbN BlnE1fLYEMxnSRdPzryRiTohGIVs7IUifnIK91Dbt+06mZAWE0xWtASaFxk9POsbGQOz7Y yBqAfzmZ75e4ONGOA0KKyuJw65E8J1XEbtGXplEtdY55z7HKMCMorDlSBQ9MN/qN6xnK/u 0Yt+dMgxm1/wkNRHYhlz47CzKAoeb4Z7UEczg0xdKvYosREIccsztfXK2ZNghg== 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 4TQsrD544jz1Hhl; Thu, 1 Feb 2024 21:44:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 411LiiAC004642; Thu, 1 Feb 2024 21:44:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 411Liika004639; Thu, 1 Feb 2024 21:44:44 GMT (envelope-from git) Date: Thu, 1 Feb 2024 21:44:44 GMT Message-Id: <202402012144.411Liika004639@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 5bdf8150cd7d - main - unix/dgram: don't clear so_error in case of MSG_PEEK List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5bdf8150cd7d19b0bd672992e6f964d30ce66408 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=5bdf8150cd7d19b0bd672992e6f964d30ce66408 commit 5bdf8150cd7d19b0bd672992e6f964d30ce66408 Author: Gleb Smirnoff AuthorDate: 2024-02-01 21:37:26 +0000 Commit: Gleb Smirnoff CommitDate: 2024-02-01 21:37:26 +0000 unix/dgram: don't clear so_error in case of MSG_PEEK --- sys/kern/uipc_usrreq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c index 554099586bbc..976490dbe2d8 100644 --- a/sys/kern/uipc_usrreq.c +++ b/sys/kern/uipc_usrreq.c @@ -1440,7 +1440,8 @@ uipc_soreceive_dgram(struct socket *so, struct sockaddr **psa, struct uio *uio, (m = STAILQ_FIRST(&so->so_rcv.uxdg_mb)) == NULL) { if (so->so_error) { error = so->so_error; - so->so_error = 0; + if (!(flags & MSG_PEEK)) + so->so_error = 0; SOCK_RECVBUF_UNLOCK(so); SOCK_IO_RECV_UNLOCK(so); return (error);