diff options
Diffstat (limited to 'sys/netinet/tcp_usrreq.c')
| -rw-r--r-- | sys/netinet/tcp_usrreq.c | 29 |
1 files changed, 5 insertions, 24 deletions
diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c index 3127c863c82b..9661a977b9ab 100644 --- a/sys/netinet/tcp_usrreq.c +++ b/sys/netinet/tcp_usrreq.c @@ -156,9 +156,6 @@ static void tcp_detach(struct socket *so, struct inpcb *inp) { struct tcpcb *tp; -#ifdef INET6 - int isipv6 = INP_CHECK_SOCKAF(so, AF_INET6) != 0; -#endif #ifdef INVARIANTS INIT_VNET_INET(so->so_vnet); #endif @@ -188,12 +185,7 @@ tcp_detach(struct socket *so, struct inpcb *inp) KASSERT(tp == NULL, ("tcp_detach: INP_TIMEWAIT && " "INP_DROPPED && tp != NULL")); in_pcbdetach(inp); -#ifdef INET6 - if (isipv6) - in6_pcbfree(inp); - else -#endif - in_pcbfree(inp); + in_pcbfree(inp); } else { in_pcbdetach(inp); INP_WUNLOCK(inp); @@ -212,15 +204,9 @@ tcp_detach(struct socket *so, struct inpcb *inp) tp->t_state < TCPS_SYN_SENT) { tcp_discardcb(tp); in_pcbdetach(inp); -#ifdef INET6 - if (isipv6) - in6_pcbfree(inp); - else -#endif - in_pcbfree(inp); - } else { - in_pcbdetach(inp); - } + in_pcbfree(inp); + } else + in_pcbdetach(inp); } } @@ -1479,12 +1465,7 @@ tcp_attach(struct socket *so) tp = tcp_newtcpcb(inp); if (tp == NULL) { in_pcbdetach(inp); -#ifdef INET6 - if (isipv6) - in6_pcbfree(inp); - else -#endif - in_pcbfree(inp); + in_pcbfree(inp); INP_INFO_WUNLOCK(&V_tcbinfo); return (ENOBUFS); } |
