From 84330faa640bbfaf8b11ec703a1d0bc68c6d4df1 Mon Sep 17 00:00:00 2001 From: Kip Macy Date: Mon, 21 Jul 2008 21:22:56 +0000 Subject: [PATCH] - Switch to INP_WLOCK macro from inp_wlock - calling sodisconnect after tcp_twstart is both gratuitous and unsafe - remove Submitted by: rwatson --- sys/netinet/tcp_offload.c | 16 +--------------- sys/netinet/tcp_offload.h | 1 - 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/sys/netinet/tcp_offload.c b/sys/netinet/tcp_offload.c index e5c3a19b207..d64805ff304 100644 --- a/sys/netinet/tcp_offload.c +++ b/sys/netinet/tcp_offload.c @@ -103,22 +103,8 @@ tcp_offload_twstart(struct tcpcb *tp) { INP_INFO_WLOCK(&tcbinfo); - inp_wlock(tp->t_inpcb); - tcp_twstart(tp); - INP_INFO_WUNLOCK(&tcbinfo); -} - -void -tcp_offload_twstart_disconnect(struct tcpcb *tp) -{ - struct socket *so; - - INP_INFO_WLOCK(&tcbinfo); - inp_wlock(tp->t_inpcb); - so = tp->t_inpcb->inp_socket; + INP_WLOCK(tp->t_inpcb); tcp_twstart(tp); - if (so) - soisdisconnected(so); INP_INFO_WUNLOCK(&tcbinfo); } diff --git a/sys/netinet/tcp_offload.h b/sys/netinet/tcp_offload.h index ed1166e38f5..d05ef464d62 100644 --- a/sys/netinet/tcp_offload.h +++ b/sys/netinet/tcp_offload.h @@ -335,7 +335,6 @@ tcp_offload_listen_close(struct tcpcb *tp) #undef tp_offload void tcp_offload_twstart(struct tcpcb *tp); -void tcp_offload_twstart_disconnect(struct tcpcb *tp); struct tcpcb *tcp_offload_close(struct tcpcb *tp); struct tcpcb *tcp_offload_drop(struct tcpcb *tp, int error); -- 2.45.2