.ru_reseed = 0
};
-static struct randomtab randomtab_20 = {
- .ru_bits = 20, /* resulting bits */
- .ru_out = 180, /* Time after wich will be reseeded */
- .ru_max = 200000, /* Uniq cycle, avoid blackjack prediction */
- .ru_gen = 2, /* Starting generator */
- .ru_n = 524269, /* RU_N-1 = 2^2*3^2*14563 */
- .ru_agen = 7, /* determine ru_a as RU_AGEN^(2*rand) */
- .ru_m = 279936, /* RU_M = 2^7*3^7 - don't change */
- .pfacts = { 2, 3, 14563, 0 }, /* factors of ru_n */
- .ru_counter = 0,
- .ru_msb = 0,
- .ru_x = 0,
- .ru_seed = 0,
- .ru_seed2 = 0,
- .ru_a = 0,
- .ru_b = 0,
- .ru_g = 0,
- .ru_reseed = 0
-};
-
static u_int32_t pmod(u_int32_t, u_int32_t, u_int32_t);
static void initid(struct randomtab *);
static u_int32_t randomid(struct randomtab *);
u_int32_t
ip6_randomflowlabel(void)
{
- return randomid(&randomtab_20) & 0xfffff;
+ return RandomULong() & IPV6_FLOWLABEL_MASK;
}