diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2015-06-08 15:47:52 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2015-06-08 15:47:52 +0000 |
commit | 985f899253c50eaf7b0a83f359d569ebc639a655 (patch) | |
tree | 5753c3389eabf5c1524f8d346595fb3f5df5b751 /usr.sbin/relayd/relayd.h | |
parent | 45d7523d8bdbe0b6e65817f05cc4d739486abb9d (diff) |
Introduce a state on the ctl_relay_event struct. This makes it possible
to better track the connection state of a session and stops doing double
opens in certain situations using http relays. Using a state field to
simplify the logic since relay_connect() is called multiple times.
OK benno@, bluhm@ and running in production for more than a week
Diffstat (limited to 'usr.sbin/relayd/relayd.h')
-rw-r--r-- | usr.sbin/relayd/relayd.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/relayd/relayd.h b/usr.sbin/relayd/relayd.h index f9f2a0fb5da..f35eca57336 100644 --- a/usr.sbin/relayd/relayd.h +++ b/usr.sbin/relayd/relayd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: relayd.h,v 1.209 2015/05/02 13:15:24 claudio Exp $ */ +/* $OpenBSD: relayd.h,v 1.210 2015/06/08 15:47:51 claudio Exp $ */ /* * Copyright (c) 2006 - 2015 Reyk Floeter <reyk@openbsd.org> @@ -200,6 +200,7 @@ struct ctl_relay_event { int line; int done; int timedout; + enum { INIT, PENDING, PRECONNECT, CONNECTED } state; enum direction dir; u_int8_t *buf; |