Module Name: src Committed By: knakahara Date: Fri Dec 7 09:11:04 UTC 2018
Modified Files: src/sys/netipsec: ipsecif.c Log Message: ipsecif(4) should not increment drop counter by errors not related to if_snd. Pointed out by ozaki-r@n.o, thanks. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/netipsec/ipsecif.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/netipsec/ipsecif.c diff -u src/sys/netipsec/ipsecif.c:1.11 src/sys/netipsec/ipsecif.c:1.12 --- src/sys/netipsec/ipsecif.c:1.11 Thu Nov 15 10:23:56 2018 +++ src/sys/netipsec/ipsecif.c Fri Dec 7 09:11:04 2018 @@ -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 @@ ipsecif4_output(struct ipsec_variant *va 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 */