summaryrefslogtreecommitdiffstats
path: root/src/types.h
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2012-04-19 17:42:56 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2012-04-19 17:42:56 +0200
commit8c91443808ce376947ff387eaffca6e8cfbe9251 (patch)
tree227a4367a2c013bbee40dc99c8abafc52da5ee2e /src/types.h
parentc5b12202c834fe484634131ee9a91465b9e6e7bc (diff)
downloadfastd-8c91443808ce376947ff387eaffca6e8cfbe9251.tar
fastd-8c91443808ce376947ff387eaffca6e8cfbe9251.zip
Don't regenerate session handshake keypair for every handshake so a global state can be used; remove the concept of temporary peers
These changes will fix the possibility of a TCP-SYN-Flood-like DoS attack, at the cost of another protocol change: as we can't count request IDs when we don't know have temporary peers, request IDs are removed completely.
Diffstat (limited to 'src/types.h')
-rw-r--r--src/types.h8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/types.h b/src/types.h
index c48cf59..6efd224 100644
--- a/src/types.h
+++ b/src/types.h
@@ -47,13 +47,6 @@ typedef enum _fastd_mode {
MODE_TUN,
} fastd_mode;
-typedef enum _fastd_peer_state {
- STATE_RESOLVE,
- STATE_WAIT,
- STATE_TEMP,
- STATE_ESTABLISHED,
-} fastd_peer_state;
-
typedef struct _fastd_buffer fastd_buffer;
@@ -78,6 +71,7 @@ typedef struct _fastd_resolve_return fastd_resolve_return;
/* May be defined by the protocol/method however it likes */
typedef struct _fastd_protocol_config fastd_protocol_config;
+typedef struct _fastd_protocol_state fastd_protocol_state;
typedef struct _fastd_protocol_peer_config fastd_protocol_peer_config;
typedef struct _fastd_protocol_peer_state fastd_protocol_peer_state;
typedef struct _fastd_method_session_state fastd_method_session_state;