From 1bc16d1a27cb5482308dc0201812e706df3d7287 Mon Sep 17 00:00:00 2001 From: bluhm Date: Wed, 21 Jul 2021 12:23:32 +0000 Subject: [PATCH] Also count crypto errors in ipsec_input_cb() like IPsec output in previous commit. --- sys/netinet/ipsec_input.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sys/netinet/ipsec_input.c b/sys/netinet/ipsec_input.c index 0c6bdeaa994..ba4b92a572f 100644 --- a/sys/netinet/ipsec_input.c +++ b/sys/netinet/ipsec_input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ipsec_input.c,v 1.175 2021/07/08 15:13:14 bluhm Exp $ */ +/* $OpenBSD: ipsec_input.c,v 1.176 2021/07/21 12:23:32 bluhm Exp $ */ /* * The authors of this code are John Ioannidis (ji@tla.org), * Angelos D. Keromytis (kermit@csd.uch.gr) and @@ -404,7 +404,12 @@ ipsec_input_cb(struct cryptop *crp) if (tdb->tdb_cryptoid != 0) tdb->tdb_cryptoid = crp->crp_sid; NET_UNLOCK(); - crypto_dispatch(crp); + error = crypto_dispatch(crp); + if (error) { + DPRINTF("crypto dispatch error %d", error); + ipsecstat_inc(ipsec_idrops); + tdb->tdb_idrops++; + } return; } DPRINTF("crypto error %d", crp->crp_etype); -- 2.20.1