correct hashed SPI lookup. reported by Greg Troxel

This commit is contained in:
itojun 2003-09-09 21:58:26 +00:00
parent f1870485d5
commit c1ae398301

View File

@ -1,4 +1,4 @@
/* $NetBSD: key.c,v 1.93 2003/09/08 06:51:56 itojun Exp $ */
/* $NetBSD: key.c,v 1.94 2003/09/09 21:58:26 itojun Exp $ */
/* $KAME: key.c,v 1.310 2003/09/08 02:23:44 itojun Exp $ */
/*
@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: key.c,v 1.93 2003/09/08 06:51:56 itojun Exp $");
__KERNEL_RCSID(0, "$NetBSD: key.c,v 1.94 2003/09/09 21:58:26 itojun Exp $");
#include "opt_inet.h"
#include "opt_ipsec.h"
@ -728,8 +728,6 @@ key_allocsa(family, src, dst, proto, spi)
LIST_FOREACH(sav, &spihash[spi % SPIHASHSIZE], spihash) {
if (sav->spi != spi)
continue;
if (sav->state != state)
continue;
if (proto != sav->sah->saidx.proto)
continue;
if (family != sav->sah->saidx.src.ss_family ||