Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-5]: src/sys/netkey pullup 1.29 -> 1.30 (approved by releng-1-5)
details: https://anonhg.NetBSD.org/src/rev/ca1c790edf30
branches: netbsd-1-5
changeset: 489288:ca1c790edf30
user: itojun <itojun%NetBSD.org@localhost>
date: Sun Aug 27 18:22:56 2000 +0000
description:
pullup 1.29 -> 1.30 (approved by releng-1-5)
> make sure to stir ESP IV. pool allocator gives me almost constant
> value. we may need to do an advisory...
diffstat:
sys/netkey/key.c | 18 +++++++++++-------
1 files changed, 11 insertions(+), 7 deletions(-)
diffs (53 lines):
diff -r 3e208e9286aa -r ca1c790edf30 sys/netkey/key.c
--- a/sys/netkey/key.c Sun Aug 27 15:25:03 2000 +0000
+++ b/sys/netkey/key.c Sun Aug 27 18:22:56 2000 +0000
@@ -1,5 +1,5 @@
-/* $NetBSD: key.c,v 1.23.2.4 2000/07/30 05:38:50 itojun Exp $ */
-/* $KAME: key.c,v 1.143 2000/07/20 17:41:01 itojun Exp $ */
+/* $NetBSD: key.c,v 1.23.2.5 2000/08/27 18:22:56 itojun Exp $ */
+/* $KAME: key.c,v 1.144 2000/07/25 20:16:54 sakane Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -2623,6 +2623,7 @@
const struct esp_algorithm *algo;
#endif
int error = 0;
+ struct timeval tv;
/* sanity check */
if (m == NULL || mhp == NULL || mhp->msg == NULL)
@@ -2773,7 +2774,14 @@
error = ENOBUFS;
goto fail;
}
- /* initialize ? */
+
+ /* initialize */
+ {
+ int i;
+ u_int8_t *p = (u_int8_t *)sav->iv;
+ for (i = 0; i < sav->ivlen; i++)
+ p[i] = key_random() & 0xff;
+ }
break;
#else
break;
@@ -2795,9 +2803,6 @@
sav->tick = 0;
/* make lifetime for CURRENT */
- {
- struct timeval tv;
-
KMALLOC(sav->lft_c, struct sadb_lifetime *,
sizeof(struct sadb_lifetime));
if (sav->lft_c == NULL) {
@@ -2817,7 +2822,6 @@
sav->lft_c->sadb_lifetime_bytes = 0;
sav->lft_c->sadb_lifetime_addtime = tv.tv_sec;
sav->lft_c->sadb_lifetime_usetime = 0;
- }
/* lifetimes for HARD and SOFT */
{
Home |
Main Index |
Thread Index |
Old Index