1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-11-27 08:00:11 +00:00

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).
This commit is contained in:
Gleb Smirnoff 2024-01-12 02:04:04 -08:00
parent 0598824cc8
commit d4033ebd05

View File

@ -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 = {