Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Jan 2024 10:04:26 GMT
From:      Gleb Smirnoff <glebius@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: d4033ebd0545 - main - divert: just return EOPNOTSUPP on shutdown(2)
Message-ID:  <202401121004.40CA4Qgd003564@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by glebius:

URL: https://cgit.FreeBSD.org/src/commit/?id=d4033ebd05455dbe7482bd0c1a329bfe52d7cdb8

commit d4033ebd05455dbe7482bd0c1a329bfe52d7cdb8
Author:     Gleb Smirnoff <glebius@FreeBSD.org>
AuthorDate: 2024-01-12 10:04:04 +0000
Commit:     Gleb Smirnoff <glebius@FreeBSD.org>
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 = {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202401121004.40CA4Qgd003564>