diff options
author | silby <silby@FreeBSD.org> | 2003-11-01 07:30:08 +0000 |
---|---|---|
committer | silby <silby@FreeBSD.org> | 2003-11-01 07:30:08 +0000 |
commit | 34fc0661fd7ffdd72ebd690082b4490b2a198754 (patch) | |
tree | 243678db3e842414f07bf976a824feb772294945 /sys/netinet/tcp_var.h | |
parent | 2cedc070de4852174973d34b8317ff273d31ca54 (diff) | |
download | FreeBSD-src-34fc0661fd7ffdd72ebd690082b4490b2a198754.zip FreeBSD-src-34fc0661fd7ffdd72ebd690082b4490b2a198754.tar.gz |
- Add a new function tcp_twrecycleable, which tells us if the ISN which
we will generate for a given ip/port tuple has advanced far enough
for the time_wait socket in question to be safely recycled.
- Have in_pcblookup_local use tcp_twrecycleable to determine if
time_Wait sockets which are hogging local ports can be safely
freed.
This change preserves proper TIME_WAIT behavior under normal
circumstances while allowing for safe and fast recycling whenever
ephemeral port space is scarce.
Diffstat (limited to 'sys/netinet/tcp_var.h')
-rw-r--r-- | sys/netinet/tcp_var.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h index 23898b9..ceb292f 100644 --- a/sys/netinet/tcp_var.h +++ b/sys/netinet/tcp_var.h @@ -246,6 +246,7 @@ struct tcptw { struct inpcb *tw_inpcb; /* XXX back pointer to internet pcb */ tcp_seq snd_nxt; tcp_seq rcv_nxt; + tcp_seq iss; tcp_cc cc_recv; tcp_cc cc_send; u_short last_win; /* cached window value */ @@ -471,6 +472,7 @@ void tcp_canceltimers(struct tcpcb *); struct tcpcb * tcp_close(struct tcpcb *); void tcp_twstart(struct tcpcb *); +int tcp_twrecycleable(struct tcptw *tw); struct tcptw * tcp_twclose(struct tcptw *_tw, int _reuse); void tcp_ctlinput(int, struct sockaddr *, void *); |