From nobody Fri Jan 12 10:04:26 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 4TBHFR1HtGz56W2M; Fri, 12 Jan 2024 10:04:27 +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 4TBHFR0ZKJz4fc7; Fri, 12 Jan 2024 10:04:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705053867; 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=SK74WOcOYuClw/Mg1UuTUpJbJBSPq9dHrLWWVa1fQms=; b=Wy3ueYcBsn5kr+RRAE1xhPJEBTt7YlNna43adjygqhB9LJeb0fVr52CQI3Ff3Sas2zXJW8 hbx9c9ztnMoju9Yo/dB+gsQj6yPvmExv4CkToFgdUE/14HkU4ELzyiGxwMVZF/4VVHpB3k 0hf9toAYuonp4FqdWzUFTGDBf3Bj2lZPC/ahOctfbkB8peRNR54cgvcUl6PU4IrTVp6yGm mMCnIyPLU8Rfrsa7X7/37tyvRNcH7Q9iWrNAln/MQRPWaH8pr56Z0R9JF4uMVXuLQV0vi5 xI9wsmvVPs2HBq7AemVglXrAODNLqEcBU/CMHata90CvXDsdr/pJPQwepwXt/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705053867; 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=SK74WOcOYuClw/Mg1UuTUpJbJBSPq9dHrLWWVa1fQms=; b=EoXkzvahar8FxP5OOziKqQ0CyJyA5V55aiXqnP/zza/YpKVeP6n8tesC60mMhgjeMFGbWX AnlRzDpN3oj5FP+Z9ih2HI2n5E7IoICi7A0/DWRqx/x74p7piOn3A/fgnWEzUqHEIUGC9+ VZ4VNPXMM2BTRPycG/EDU1Ipv/r+CiBuky1t4QRZ/of0X6dJw2UlimMEIkPlcWEWYwbFSu CqTvPiaIWNF6pxOSN0jjUsdH6VBj4OVY2k9vQty3aCR4ae1Uq4OdmWKZEGTdXtpZoMAoFP Zt7Wte8RqO6MARGLOF0Y/u7u9i88wwaMsTbZsfGdrtS1mOKwyE5kKUFcsqjfFg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705053867; a=rsa-sha256; cv=none; b=kyyhzDV110hqPjX3RaOvIFIDIJEgck+gUVspE3Uj+DPczNgjefr8JEBFFRUIkzLnbiJzA1 vEkhJY6dZUt5lmCvMl3VXQuw/wZIzzjgs7eJQJPlPixIDLh5oL336aH0OYR+DZ6FZdcwvT kF3dl/wjV57E+NwWRvhBfy6BL/EkPajfDHiVqdp/5htVyz6dkTXAt/rFDrlJMeDvNZ6VkD GF52mFU7n36xveu92o5CHWGMqDPQ9b8TseyoARHEbME2LrPhFjF/VqVBPC2eLCBobTdRho 1NBQ1JK41aeFGB5yQQcZtGGrt4Ns6lJ+EoWVmzB6NEvgqmJ5ZiZsKiBneEcimg== 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 4TBHFQ6mnvzyHB; Fri, 12 Jan 2024 10:04:26 +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 40CA4Qgu003567; Fri, 12 Jan 2024 10:04:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40CA4Qgd003564; Fri, 12 Jan 2024 10:04:26 GMT (envelope-from git) Date: Fri, 12 Jan 2024 10:04:26 GMT Message-Id: <202401121004.40CA4Qgd003564@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: d4033ebd0545 - main - divert: just return EOPNOTSUPP on shutdown(2) 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: d4033ebd05455dbe7482bd0c1a329bfe52d7cdb8 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=d4033ebd05455dbe7482bd0c1a329bfe52d7cdb8 commit d4033ebd05455dbe7482bd0c1a329bfe52d7cdb8 Author: Gleb Smirnoff AuthorDate: 2024-01-12 10:04:04 +0000 Commit: Gleb Smirnoff CommitDate: 2024-01-12 10:04:04 +0000 divert: just return EOPNOTSUPP on shutdown(2) Before this change we would always return ENOTCONN. There is no legitimate use of shutdown(2) on divert(4). --- sys/netinet/ip_divert.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/sys/netinet/ip_divert.c b/sys/netinet/ip_divert.c index 78ca36fc2a0f..6bc76e0be111 100644 --- a/sys/netinet/ip_divert.c +++ b/sys/netinet/ip_divert.c @@ -635,14 +635,6 @@ div_bind(struct socket *so, struct sockaddr *nam, struct thread *td) return (0); } -static int -div_shutdown(struct socket *so) -{ - - socantsendmore(so); - return 0; -} - static int div_pcblist(SYSCTL_HANDLER_ARGS) { @@ -720,7 +712,6 @@ static struct protosw div_protosw = { .pr_bind = div_bind, .pr_detach = div_detach, .pr_send = div_send, - .pr_shutdown = div_shutdown, }; static struct domain divertdomain = {