From 7293c5dd8175aac4650cb48c68c7dd278a74371e Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Wed, 1 Mar 2000 14:49:07 +0000 Subject: Added proto->hash_key which contains randomly generated hash key used for calculation of hash functions depending on proto. --- nest/proto.c | 1 + nest/protocol.h | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'nest') diff --git a/nest/proto.c b/nest/proto.c index da75866..68975ad 100644 --- a/nest/proto.c +++ b/nest/proto.c @@ -89,6 +89,7 @@ proto_new(struct proto_config *c, unsigned size) p->in_filter = c->in_filter; p->out_filter = c->out_filter; p->min_scope = SCOPE_SITE; + p->hash_key = random_u32(); c->proto = p; return p; } diff --git a/nest/protocol.h b/nest/protocol.h index f1afb53..0dacccb 100644 --- a/nest/protocol.h +++ b/nest/protocol.h @@ -1,7 +1,7 @@ /* * BIRD Internet Routing Daemon -- Protocols * - * (c) 1998--1999 Martin Mares + * (c) 1998--2000 Martin Mares * * Can be freely distributed and used under the terms of the GNU GPL. */ @@ -103,6 +103,7 @@ struct proto { unsigned core_state; /* Core state machine (see below) */ unsigned core_goal; /* State we want to reach (see below) */ unsigned reconfiguring; /* We're shutting down due to reconfiguration */ + u32 hash_key; /* Random key used for hashing of neighbors */ bird_clock_t last_state_change; /* Time of last state transition */ /* -- cgit v1.2.3