summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorume <ume@FreeBSD.org>2003-10-01 21:45:57 +0000
committerume <ume@FreeBSD.org>2003-10-01 21:45:57 +0000
commitf89179cc1b284de0ec911d41920d8bdb9cb2978f (patch)
tree6328707334079d5efe6c797045f80a3d468f1ce6
parentbcebb5ef313410e3643f4cdd89202c61e2b1cdf2 (diff)
downloadFreeBSD-src-f89179cc1b284de0ec911d41920d8bdb9cb2978f.zip
FreeBSD-src-f89179cc1b284de0ec911d41920d8bdb9cb2978f.tar.gz
add randomtab for ip6_randomflowlabel().
Obtained from: KAME
-rw-r--r--sys/netinet6/ip6_id.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/sys/netinet6/ip6_id.c b/sys/netinet6/ip6_id.c
index cd2ae2d..ca193b8 100644
--- a/sys/netinet6/ip6_id.c
+++ b/sys/netinet6/ip6_id.c
@@ -137,6 +137,17 @@ static struct randomtab randomtab_32 = {
{ 2, 3, 59652323, 0 }, /* factors of ru_n */
};
+static struct randomtab randomtab_20 = {
+ 20, /* resulting bits */
+ 180, /* Time after wich will be reseeded */
+ 200000, /* Uniq cycle, avoid blackjack prediction */
+ 2, /* Starting generator */
+ 524269, /* RU_N-1 = 2^2*3^2*14563 */
+ 7, /* determine ru_a as RU_AGEN^(2*rand) */
+ 279936, /* RU_M = 2^7*3^7 - don't change */
+ { 2, 3, 14563, 0 }, /* factors of ru_n */
+};
+
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 *);
OpenPOWER on IntegriCloud