Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/netipsec Don't validate sav lists of LARVAL or DEAD states
details: https://anonhg.NetBSD.org/src/rev/118bbf2cc9d4
branches: trunk
changeset: 355170:118bbf2cc9d4
user: ozaki-r <ozaki-r%NetBSD.org@localhost>
date: Sun Jul 16 10:36:52 2017 +0000
description:
Don't validate sav lists of LARVAL or DEAD states
We don't sort the lists so the validation will always fail.
Fix PR kern/52405
diffstat:
sys/netipsec/key.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (28 lines):
diff -r 55079db5e9ac -r 118bbf2cc9d4 sys/netipsec/key.c
--- a/sys/netipsec/key.c Sun Jul 16 06:14:23 2017 +0000
+++ b/sys/netipsec/key.c Sun Jul 16 10:36:52 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: key.c,v 1.185 2017/07/15 22:48:32 christos Exp $ */
+/* $NetBSD: key.c,v 1.186 2017/07/16 10:36:52 ozaki-r Exp $ */
/* $FreeBSD: src/sys/netipsec/key.c,v 1.3.2.3 2004/02/14 22:23:23 bms Exp $ */
/* $KAME: key.c,v 1.191 2001/06/27 10:46:49 sakane Exp $ */
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: key.c,v 1.185 2017/07/15 22:48:32 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: key.c,v 1.186 2017/07/16 10:36:52 ozaki-r Exp $");
/*
* This code is referd to RFC 2367
@@ -7816,7 +7816,8 @@
sav->state = state;
LIST_INSERT_HEAD(&sav->sah->savtree[state], sav, chain);
- key_validate_savlist(sav->sah, state);
+ if (SADB_SASTATE_USABLE_P(sav))
+ key_validate_savlist(sav->sah, state);
}
/* XXX too much? */
Home |
Main Index |
Thread Index |
Old Index