diff options
author | jlemon <jlemon@FreeBSD.org> | 2003-02-19 22:32:43 +0000 |
---|---|---|
committer | jlemon <jlemon@FreeBSD.org> | 2003-02-19 22:32:43 +0000 |
commit | a8bc02dcb257f24a8246bb1c31abe58bf12ebd04 (patch) | |
tree | 6317b858b0555a797efb2e5b5bd4c2eebbdc0d10 /sys/netinet6/in6_pcb.c | |
parent | 79a1ebfa6f53d733dc4775c2031ff3d16e53b75c (diff) | |
download | FreeBSD-src-a8bc02dcb257f24a8246bb1c31abe58bf12ebd04.zip FreeBSD-src-a8bc02dcb257f24a8246bb1c31abe58bf12ebd04.tar.gz |
Add a TCP TIMEWAIT state which uses less space than a fullblown TCP
control block. Allow the socket and tcpcb structures to be freed
earlier than inpcb. Update code to understand an inp w/o a socket.
Reviewed by: hsu, silby, jayanth
Sponsored by: DARPA, NAI Labs
Diffstat (limited to 'sys/netinet6/in6_pcb.c')
-rw-r--r-- | sys/netinet6/in6_pcb.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/netinet6/in6_pcb.c b/sys/netinet6/in6_pcb.c index 963cd9a..b328d32 100644 --- a/sys/netinet6/in6_pcb.c +++ b/sys/netinet6/in6_pcb.c @@ -614,9 +614,10 @@ in6_pcbdetach(inp) #endif /* IPSEC */ inp->inp_gencnt = ++ipi->ipi_gencnt; in_pcbremlists(inp); - sotoinpcb(so) = 0; - sotryfree(so); - + if (so) { + so->so_pcb = NULL; + sotryfree(so); + } if (inp->in6p_options) m_freem(inp->in6p_options); ip6_freepcbopts(inp->in6p_outputopts); @@ -627,7 +628,6 @@ in6_pcbdetach(inp) if (inp->inp_options) (void)m_free(inp->inp_options); ip_freemoptions(inp->inp_moptions); - inp->inp_vflag = 0; INP_LOCK_DESTROY(inp); uma_zfree(ipi->ipi_zone, inp); |