Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-8]: src/sys/netipsec Pull up rev 1.78 of sys/netipsec/xform_ah.c ...



details:   https://anonhg.NetBSD.org/src/rev/c79bf1d28792
branches:  netbsd-8
changeset: 851426:c79bf1d28792
user:      martin <martin%NetBSD.org@localhost>
date:      Mon Feb 26 18:42:49 2018 +0000

description:
Pull up rev 1.78 of sys/netipsec/xform_ah.c for real, requested by
ozaki-r in ticket #587 (and already claimed to be part of previous
commit)

diffstat:

 sys/netipsec/xform_ah.c |  34 ++--------------------------------
 1 files changed, 2 insertions(+), 32 deletions(-)

diffs (62 lines):

diff -r e659e3c518db -r c79bf1d28792 sys/netipsec/xform_ah.c
--- a/sys/netipsec/xform_ah.c   Mon Feb 26 13:57:25 2018 +0000
+++ b/sys/netipsec/xform_ah.c   Mon Feb 26 18:42:49 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: xform_ah.c,v 1.54.2.4 2018/02/26 13:10:52 martin Exp $ */
+/*     $NetBSD: xform_ah.c,v 1.54.2.5 2018/02/26 18:42:49 martin Exp $ */
 /*     $FreeBSD: src/sys/netipsec/xform_ah.c,v 1.1.4.1 2003/01/24 05:11:36 sam Exp $   */
 /*     $OpenBSD: ip_ah.c,v 1.63 2001/06/26 06:18:58 angelos Exp $ */
 /*
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xform_ah.c,v 1.54.2.4 2018/02/26 13:10:52 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xform_ah.c,v 1.54.2.5 2018/02/26 18:42:49 martin Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_inet.h"
@@ -855,18 +855,6 @@
        IPSEC_ACQUIRE_GLOBAL_LOCKS();
 
        sav = tc->tc_sav;
-       if (__predict_false(!SADB_SASTATE_USABLE_P(sav))) {
-               KEY_SA_UNREF(&sav);
-               sav = KEY_LOOKUP_SA(&tc->tc_dst, tc->tc_proto, tc->tc_spi,
-                   sport, dport);
-               if (sav == NULL) {
-                       AH_STATINC(AH_STAT_NOTDB);
-                       DPRINTF(("%s: SA expired while in crypto\n", __func__));
-                       error = ENOBUFS;                /*XXX*/
-                       goto bad;
-               }
-       }
-
        saidx = &sav->sah->saidx;
        KASSERTMSG(saidx->dst.sa.sa_family == AF_INET ||
            saidx->dst.sa.sa_family == AF_INET6,
@@ -1274,24 +1262,6 @@
 
        isr = tc->tc_isr;
        sav = tc->tc_sav;
-       if (__predict_false(isr->sp->state == IPSEC_SPSTATE_DEAD)) {
-               AH_STATINC(AH_STAT_NOTDB);
-               IPSECLOG(LOG_DEBUG,
-                   "SP is being destroyed while in crypto (id=%u)\n",
-                   isr->sp->id);
-               error = ENOENT;
-               goto bad;
-       }
-       if (__predict_false(!SADB_SASTATE_USABLE_P(sav))) {
-               KEY_SA_UNREF(&sav);
-               sav = KEY_LOOKUP_SA(&tc->tc_dst, tc->tc_proto, tc->tc_spi, 0, 0);
-               if (sav == NULL) {
-                       AH_STATINC(AH_STAT_NOTDB);
-                       DPRINTF(("%s: SA expired while in crypto\n", __func__));
-                       error = ENOBUFS;                /*XXX*/
-                       goto bad;
-               }
-       }
 
        /* Check for crypto errors. */
        if (crp->crp_etype) {



Home | Main Index | Thread Index | Old Index