Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/netipsec ipsecif(4) should not increment drop counter by...
details: https://anonhg.NetBSD.org/src/rev/cce1d1d66f5e
branches: trunk
changeset: 446467:cce1d1d66f5e
user: knakahara <knakahara%NetBSD.org@localhost>
date: Fri Dec 07 09:11:04 2018 +0000
description:
ipsecif(4) should not increment drop counter by errors not related to if_snd. Pointed out by ozaki-r@n.o, thanks.
diffstat:
sys/netipsec/ipsecif.c | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
diffs (31 lines):
diff -r a977780d255f -r cce1d1d66f5e sys/netipsec/ipsecif.c
--- a/sys/netipsec/ipsecif.c Fri Dec 07 08:52:43 2018 +0000
+++ b/sys/netipsec/ipsecif.c Fri Dec 07 09:11:04 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ipsecif.c,v 1.11 2018/11/15 10:23:56 maxv Exp $ */
+/* $NetBSD: ipsecif.c,v 1.12 2018/12/07 09:11:04 knakahara Exp $ */
/*
* Copyright (c) 2017 Internet Initiative Japan Inc.
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ipsecif.c,v 1.11 2018/11/15 10:23:56 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ipsecif.c,v 1.12 2018/12/07 09:11:04 knakahara Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -364,10 +364,9 @@
KASSERT(sp->policy != IPSEC_POLICY_ENTRUST);
KASSERT(sp->policy != IPSEC_POLICY_BYPASS);
if (sp->policy != IPSEC_POLICY_IPSEC) {
- struct ifnet *ifp = &var->iv_softc->ipsec_if;
m_freem(m);
- IF_DROP(&ifp->if_snd);
- return 0;
+ error = ENETUNREACH;
+ goto done;
}
/* get flowinfo */
Home |
Main Index |
Thread Index |
Old Index