performance optimization for the DOS protection.

* half-open SAs per peer are tracked in a hash table
 * charon.dos_protection setting replaced with charon.cookie_threshold and charon.block_threshold
 * chunk_hash function added
This commit is contained in:
Tobias Brunner
2008-11-25 13:16:05 +00:00
parent 28dd27be64
commit ed6146ffbe
5 changed files with 322 additions and 41 deletions
+7
View File
@@ -1,4 +1,5 @@
/*
* Copyright (C) 2008 Tobias Brunner
* Copyright (C) 2005-2008 Martin Willi
* Copyright (C) 2005 Jan Hutter
* Hochschule fuer Technik Rapperswil
@@ -199,6 +200,12 @@ int chunk_compare(chunk_t a, chunk_t b);
*/
bool chunk_equals(chunk_t a, chunk_t b);
/**
* Computes a 32 bit hash of the given chunk.
* Note: This hash is only intended for hash tables not for cryptographic purposes.
*/
u_int32_t chunk_hash(chunk_t chunk);
/**
* Get printf hooks for a chunk.
*