summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/netinet/ip_id.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/netinet/ip_id.c b/sys/netinet/ip_id.c
index 67065a815e9..d92ba8c25ea 100644
--- a/sys/netinet/ip_id.c
+++ b/sys/netinet/ip_id.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_id.c,v 1.9 2003/12/12 02:03:27 itojun Exp $ */
+/* $OpenBSD: ip_id.c,v 1.10 2003/12/12 02:50:44 itojun Exp $ */
/*
* Copyright 1998 Niels Provos <provos@citi.umich.edu>
@@ -75,7 +75,7 @@ const static u_int16_t pfacts[PFAC_N] = {
};
static u_int16_t ru_x;
-static u_int16_t ru_seed;
+static u_int16_t ru_seed, ru_seed2;
static u_int16_t ru_a, ru_b;
static u_int16_t ru_g;
static u_int16_t ru_counter = 0;
@@ -128,6 +128,7 @@ ip_initid(void)
/* 15 bits of random seed */
ru_seed = (tmp >> 16) & 0x7FFF;
+ ru_seed2 = arc4random() & 0x7FFF;
/* Determine the LCG we use */
ru_b = ((tmp = arc4random()) & 0xfffe) | 1;