From 3e8422f7ae25b9e0fdc70af2361ffcc661138f21 Mon Sep 17 00:00:00 2001 From: Sepherosa Ziehau Date: Sun, 18 Oct 2015 20:41:51 +0800 Subject: [PATCH] tcp/usrreq: TCP socket must not be reattached --- sys/netinet/tcp_usrreq.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c index 5c78dbef01..aa5fdad7a8 100644 --- a/sys/netinet/tcp_usrreq.c +++ b/sys/netinet/tcp_usrreq.c @@ -209,11 +209,8 @@ tcp_usr_attach(netmsg_t msg) soreference(so); inp = so->so_pcb; + KASSERT(inp == NULL, ("tcp socket attached")); TCPDEBUG1(); - if (inp) { - error = EISCONN; - goto out; - } error = tcp_attach(so, ai); if (error) -- 2.41.0