summaryrefslogtreecommitdiffstats
path: root/list.c
diff options
context:
space:
mode:
authorjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2008-06-04 05:16:44 +0000
committerjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2008-06-04 05:16:44 +0000
commit47ae8457f9e9c2bb0f5c1e8f28822e1bbc16c196 (patch)
tree0f47ea714dda8312ee85fe7530ee231c59b91221 /list.c
parent7c51fe16b435712423dd00145008ab58a95fdc5e (diff)
downloadopenvpn-47ae8457f9e9c2bb0f5c1e8f28822e1bbc16c196.tar.gz
openvpn-47ae8457f9e9c2bb0f5c1e8f28822e1bbc16c196.tar.xz
openvpn-47ae8457f9e9c2bb0f5c1e8f28822e1bbc16c196.zip
Incremented version to 2.1_rc7d.
Support asynchronous authentication by plugins by allowing OPENVPN_PLUGIN_AUTH_USER_PASS_VERIFY to return OPENVPN_PLUGIN_FUNC_DEFERRED. See comments in openvpn-plugin.h for documentation. Enabled by ENABLE_DEF_AUTH. Added a simple packet filter functionality that can be driven by a plugin. See comments in openvpn-plugin.h for documentation. Enabled by ENABLE_PF. See openvpn/plugin/defer/simple.c for examples of ENABLE_DEF_AUTH and ENABLE_PF. "TLS Error: local/remote TLS keys are out of sync" is no longer a fatal error for TCP-based sessions, since the error can arise normally in the course of deferred authentication. In a related change, allow packet-id sequence to begin at some number n > 0 for TCP sessions, rather than strictly requiring sequence to begin at 1. Added a test to configure.ac for LoadLibrary function on Windows. Modified "make dist" function to include all files from install-win32 so that ./domake-win can be run from a tarball-expanded directory. setenv and setenv-safe directives may now omit a value argument which defaults to "". git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@2978 e7ae566f-a301-0410-adde-c780ea21d3b5
Diffstat (limited to 'list.c')
-rw-r--r--list.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/list.c b/list.c
index 8849957..4fe7479 100644
--- a/list.c
+++ b/list.c
@@ -33,6 +33,7 @@
struct hash *
hash_init (const int n_buckets,
+ const uint32_t iv,
uint32_t (*hash_function)(const void *key, uint32_t iv),
bool (*compare_function)(const void *key1, const void *key2))
{
@@ -45,7 +46,7 @@ hash_init (const int n_buckets,
h->mask = h->n_buckets - 1;
h->hash_function = hash_function;
h->compare_function = compare_function;
- h->iv = get_random ();
+ h->iv = iv;
ALLOC_ARRAY (h->buckets, struct hash_bucket, h->n_buckets);
for (i = 0; i < h->n_buckets; ++i)
{
@@ -398,8 +399,8 @@ list_test (void)
{
struct gc_arena gc = gc_new ();
- struct hash *hash = hash_init (10000, word_hash_function, word_compare_function);
- struct hash *nhash = hash_init (256, word_hash_function, word_compare_function);
+ struct hash *hash = hash_init (10000, get_random (), word_hash_function, word_compare_function);
+ struct hash *nhash = hash_init (256, get_random (), word_hash_function, word_compare_function);
printf ("hash_init n_buckets=%d mask=0x%08x\n", hash->n_buckets, hash->mask);