+check_handshake_flood(void *unused)
+{
+ conn_t *conn;
+ rb_dlink_node *ptr, *next;
+ unsigned int count;
+ int i;
+ HASH_WALK_SAFE(i, CONN_HASH_SIZE, ptr, next, connid_hash_table)
+ {
+ conn = ptr->data;
+ if(!IsSSL(conn))
+ continue;
+
+ count = rb_ssl_handshake_count(conn->mod_fd);
+ /* nothing needs to do this more than twice in ten seconds i don't think */
+ if(count > 2)
+ close_conn(conn, WAIT_PLAIN, "Handshake flooding");
+ else
+ rb_ssl_clear_handshake_count(conn->mod_fd);
+ }
+HASH_WALK_END}
+
+static void
+conn_mod_write_sendq(rb_fde_t *fd, void *data)