summaryrefslogtreecommitdiff
path: root/sys/netinet/tcp_var.h
diff options
context:
space:
mode:
authorMarkus Friedl <markus@cvs.openbsd.org>2004-11-25 15:32:09 +0000
committerMarkus Friedl <markus@cvs.openbsd.org>2004-11-25 15:32:09 +0000
commitf7a08eb995954e1589ac898355fdd7c49742f0a8 (patch)
treed44ae27476029ee8d3d991f37c34322339a97014 /sys/netinet/tcp_var.h
parent7c9e4c2086c4479dbec08dd4d1e199a9864ee907 (diff)
fix for race between invocation for timer and network input
1) add a reaper for TCP and SYN cache states (cf. netbsd pr 20390) 2) additional check for TCP_TIMER_ISARMED(TCPT_REXMT) in tcp_timer_persist() with mickey@; ok deraadt@
Diffstat (limited to 'sys/netinet/tcp_var.h')
-rw-r--r--sys/netinet/tcp_var.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h
index 9eb1dc3c0e4..66999823ae4 100644
--- a/sys/netinet/tcp_var.h
+++ b/sys/netinet/tcp_var.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcp_var.h,v 1.67 2004/10/28 19:22:52 mcbride Exp $ */
+/* $OpenBSD: tcp_var.h,v 1.68 2004/11/25 15:32:08 markus Exp $ */
/* $NetBSD: tcp_var.h,v 1.17 1996/02/13 23:44:24 christos Exp $ */
/*
@@ -84,6 +84,7 @@ struct tcpcb {
#endif
#define TF_REASSLOCK 0x00080000 /* reassembling or draining */
#define TF_LASTIDLE 0x00100000 /* no outstanding ACK on last send */
+#define TF_DEAD 0x00200000 /* dead and to-be-released */
struct mbuf *t_template; /* skeletal packet for transmit */
struct inpcb *t_inpcb; /* back pointer to internet pcb */
@@ -181,6 +182,8 @@ struct tcpcb {
caddr_t t_tuba_pcb; /* next level down pcb for TCP over z */
int pf;
+
+ struct timeout t_reap_to; /* delayed cleanup timeout */
};
#define intotcpcb(ip) ((struct tcpcb *)(ip)->inp_ppcb)
@@ -550,6 +553,7 @@ int tcp_attach(struct socket *);
void tcp_canceltimers(struct tcpcb *);
struct tcpcb *
tcp_close(struct tcpcb *);
+void tcp_reaper(void *);
int tcp_freeq(struct tcpcb *);
#if defined(INET6) && !defined(TCP6)
void tcp6_ctlinput(int, struct sockaddr *, void *);
@@ -646,6 +650,7 @@ void syn_cache_reset(struct sockaddr *, struct sockaddr *,
int syn_cache_respond(struct syn_cache *, struct mbuf *);
void syn_cache_timer(void *);
void syn_cache_cleanup(struct tcpcb *);
+void syn_cache_reaper(void *);
#endif /* _KERNEL */
#endif /* _NETINET_TCP_VAR_H_ */