Added proto->hash_key which contains randomly generated hash key used
for calculation of hash functions depending on proto.
This commit is contained in:
parent
62ab789de5
commit
7293c5dd81
2 changed files with 3 additions and 1 deletions
|
@ -89,6 +89,7 @@ proto_new(struct proto_config *c, unsigned size)
|
||||||
p->in_filter = c->in_filter;
|
p->in_filter = c->in_filter;
|
||||||
p->out_filter = c->out_filter;
|
p->out_filter = c->out_filter;
|
||||||
p->min_scope = SCOPE_SITE;
|
p->min_scope = SCOPE_SITE;
|
||||||
|
p->hash_key = random_u32();
|
||||||
c->proto = p;
|
c->proto = p;
|
||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* BIRD Internet Routing Daemon -- Protocols
|
* 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.
|
* 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_state; /* Core state machine (see below) */
|
||||||
unsigned core_goal; /* State we want to reach (see below) */
|
unsigned core_goal; /* State we want to reach (see below) */
|
||||||
unsigned reconfiguring; /* We're shutting down due to reconfiguration */
|
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 */
|
bird_clock_t last_state_change; /* Time of last state transition */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in a new issue