summaryrefslogtreecommitdiffstats
path: root/sys/netinet/ip_divert.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/netinet/ip_divert.c')
-rw-r--r--sys/netinet/ip_divert.c33
1 files changed, 0 insertions, 33 deletions
diff --git a/sys/netinet/ip_divert.c b/sys/netinet/ip_divert.c
index 8d2b61b..6287e76 100644
--- a/sys/netinet/ip_divert.c
+++ b/sys/netinet/ip_divert.c
@@ -415,12 +415,7 @@ div_attach(struct socket *so, int proto, struct thread *td)
inp->inp_ip_p = proto;
inp->inp_vflag |= INP_IPV4;
inp->inp_flags |= INP_HDRINCL;
- /* The socket is always "connected" because
- we always know "where" to send the packet */
INP_UNLOCK(inp);
- SOCK_LOCK(so);
- so->so_state |= SS_ISCONNECTED;
- SOCK_UNLOCK(so);
return 0;
}
@@ -442,32 +437,6 @@ div_detach(struct socket *so)
}
static int
-div_abort(struct socket *so)
-{
- struct inpcb *inp;
-
- INP_INFO_WLOCK(&divcbinfo);
- inp = sotoinpcb(so);
- if (inp == 0) {
- INP_INFO_WUNLOCK(&divcbinfo);
- return EINVAL; /* ??? possible? panic instead? */
- }
- INP_LOCK(inp);
- soisdisconnected(so);
- in_pcbdetach(inp);
- INP_INFO_WUNLOCK(&divcbinfo);
- return 0;
-}
-
-static int
-div_disconnect(struct socket *so)
-{
- if ((so->so_state & SS_ISCONNECTED) == 0)
- return ENOTCONN;
- return div_abort(so);
-}
-
-static int
div_bind(struct socket *so, struct sockaddr *nam, struct thread *td)
{
struct inpcb *inp;
@@ -662,12 +631,10 @@ SYSCTL_PROC(_net_inet_divert, OID_AUTO, pcblist, CTLFLAG_RD, 0, 0,
#endif
struct pr_usrreqs div_usrreqs = {
- .pru_abort = div_abort,
.pru_attach = div_attach,
.pru_bind = div_bind,
.pru_control = in_control,
.pru_detach = div_detach,
- .pru_disconnect = div_disconnect,
.pru_peeraddr = div_peeraddr,
.pru_send = div_send,
.pru_shutdown = div_shutdown,
OpenPOWER on IntegriCloud