git: d4033ebd0545 - main - divert: just return EOPNOTSUPP on shutdown(2)
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 12 Jan 2024 10:04:26 UTC
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 = {