summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/netipsec/xform_ah.c6
-rw-r--r--sys/netipsec/xform_esp.c7
2 files changed, 6 insertions, 7 deletions
diff --git a/sys/netipsec/xform_ah.c b/sys/netipsec/xform_ah.c
index 1cb22c9c31d..69fc8755616 100644
--- a/sys/netipsec/xform_ah.c
+++ b/sys/netipsec/xform_ah.c
@@ -1,4 +1,4 @@
-/* $NetBSD: xform_ah.c,v 1.40 2013/06/24 04:21:20 riastradh Exp $ */
+/* $NetBSD: xform_ah.c,v 1.41 2013/08/28 15:24:41 riastradh 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.40 2013/06/24 04:21:20 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xform_ah.c,v 1.41 2013/08/28 15:24:41 riastradh Exp $");
#include "opt_inet.h"
#ifdef __FreeBSD__
@@ -910,7 +910,7 @@ ah_input_cb(struct cryptop *crp)
ptr = (char *) (tc + 1);
/* Verify authenticator. */
- if (consttime_memequal(ptr + skip + rplen, calc, authsize)) {
+ if (!consttime_memequal(ptr + skip + rplen, calc, authsize)) {
u_int8_t *pppp = ptr + skip+rplen;
DPRINTF(("ah_input: authentication hash mismatch " \
"over %d bytes " \
diff --git a/sys/netipsec/xform_esp.c b/sys/netipsec/xform_esp.c
index b6d97fd321c..80b9c451c85 100644
--- a/sys/netipsec/xform_esp.c
+++ b/sys/netipsec/xform_esp.c
@@ -1,4 +1,4 @@
-/* $NetBSD: xform_esp.c,v 1.43 2013/06/24 04:21:20 riastradh Exp $ */
+/* $NetBSD: xform_esp.c,v 1.44 2013/08/28 15:24:41 riastradh Exp $ */
/* $FreeBSD: src/sys/netipsec/xform_esp.c,v 1.2.2.1 2003/01/24 05:11:36 sam Exp $ */
/* $OpenBSD: ip_esp.c,v 1.69 2001/06/26 06:18:59 angelos Exp $ */
@@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xform_esp.c,v 1.43 2013/06/24 04:21:20 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xform_esp.c,v 1.44 2013/08/28 15:24:41 riastradh Exp $");
#include "opt_inet.h"
#ifdef __FreeBSD__
@@ -593,8 +593,7 @@ esp_input_cb(struct cryptop *crp)
ptr = (tc + 1);
/* Verify authenticator */
- if (consttime_memequal(ptr, aalg, esph->authsize)
- != 0) {
+ if (!consttime_memequal(ptr, aalg, esph->authsize)) {
DPRINTF(("esp_input_cb: "
"authentication hash mismatch for packet in SA %s/%08lx\n",
ipsec_address(&saidx->dst),