]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Added proto->hash_key which contains randomly generated hash key used
authorMartin Mares <mj@ucw.cz>
Wed, 1 Mar 2000 14:49:07 +0000 (14:49 +0000)
committerMartin Mares <mj@ucw.cz>
Wed, 1 Mar 2000 14:49:07 +0000 (14:49 +0000)
for calculation of hash functions depending on proto.

nest/proto.c
nest/protocol.h

index da75866551176dfc8d5adff95080b59df20eed00..68975addba3e0169877bf0add3fc37c806c644d0 100644 (file)
@@ -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;
 }
index f1afb53252303f26c55f9f3b09743e794b01a262..0dacccbd7944d9a4bdcd12ae37e4a60867ed5a82 100644 (file)
@@ -1,7 +1,7 @@
 /*
  *     BIRD Internet Routing Daemon -- Protocols
  *
- *     (c) 1998--1999 Martin Mares <mj@ucw.cz>
+ *     (c) 1998--2000 Martin Mares <mj@ucw.cz>
  *
  *     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 */
 
   /*