Remove duplicate IPSEC_STATINC(IPSEC_STAT_IN_POLVIO), ipsec_in_reject
already increases it. IPSEC6_STATINC is now unused, so remove it too.
This commit is contained in:
parent
a96bf12681
commit
e9a0140794
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: tcp_input.c,v 1.380 2018/02/26 09:04:29 maxv Exp $ */
|
||||
/* $NetBSD: tcp_input.c,v 1.381 2018/02/28 11:09:03 maxv Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
|
||||
@ -148,7 +148,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: tcp_input.c,v 1.380 2018/02/26 09:04:29 maxv Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: tcp_input.c,v 1.381 2018/02/28 11:09:03 maxv Exp $");
|
||||
|
||||
#ifdef _KERNEL_OPT
|
||||
#include "opt_inet.h"
|
||||
@ -1461,14 +1461,12 @@ findpcb:
|
||||
if (inp &&
|
||||
(inp->inp_socket->so_options & SO_ACCEPTCONN) == 0
|
||||
&& ipsec_in_reject(m, inp)) {
|
||||
IPSEC_STATINC(IPSEC_STAT_IN_POLVIO);
|
||||
goto drop;
|
||||
}
|
||||
#ifdef INET6
|
||||
else if (in6p &&
|
||||
(in6p->in6p_socket->so_options & SO_ACCEPTCONN) == 0
|
||||
&& ipsec_in_reject(m, in6p)) {
|
||||
IPSEC_STATINC(IPSEC_STAT_IN_POLVIO);
|
||||
goto drop;
|
||||
}
|
||||
#endif
|
||||
@ -1506,7 +1504,6 @@ findpcb:
|
||||
if (ipsec_used && in6p &&
|
||||
(in6p->in6p_socket->so_options & SO_ACCEPTCONN) == 0 &&
|
||||
ipsec_in_reject(m, in6p)) {
|
||||
IPSEC6_STATINC(IPSEC_STAT_IN_POLVIO);
|
||||
goto drop;
|
||||
}
|
||||
#endif /*IPSEC*/
|
||||
@ -1787,7 +1784,6 @@ nosave:;
|
||||
sotoinpcb(so) == inp);
|
||||
if (!ipsec_in_reject(m, inp))
|
||||
break;
|
||||
IPSEC_STATINC(IPSEC_STAT_IN_POLVIO);
|
||||
tp = NULL;
|
||||
goto dropwithreset;
|
||||
#endif
|
||||
@ -1796,7 +1792,6 @@ nosave:;
|
||||
KASSERT(sotoin6pcb(so) == in6p);
|
||||
if (!ipsec_in_reject(m, in6p))
|
||||
break;
|
||||
IPSEC6_STATINC(IPSEC_STAT_IN_POLVIO);
|
||||
tp = NULL;
|
||||
goto dropwithreset;
|
||||
#endif /*INET6*/
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: udp_usrreq.c,v 1.243 2018/02/26 09:04:29 maxv Exp $ */
|
||||
/* $NetBSD: udp_usrreq.c,v 1.244 2018/02/28 11:09:03 maxv Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
|
||||
@ -66,7 +66,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: udp_usrreq.c,v 1.243 2018/02/26 09:04:29 maxv Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: udp_usrreq.c,v 1.244 2018/02/28 11:09:03 maxv Exp $");
|
||||
|
||||
#ifdef _KERNEL_OPT
|
||||
#include "opt_inet.h"
|
||||
@ -480,7 +480,6 @@ udp4_sendup(struct mbuf *m, int off /* offset of data portion */,
|
||||
#if defined(IPSEC)
|
||||
/* check AH/ESP integrity. */
|
||||
if (ipsec_used && ipsec_in_reject(m, inp)) {
|
||||
IPSEC_STATINC(IPSEC_STAT_IN_POLVIO);
|
||||
if ((n = m_copypacket(m, M_DONTWAIT)) != NULL)
|
||||
icmp_error(n, ICMP_UNREACH, ICMP_UNREACH_ADMIN_PROHIBIT,
|
||||
0, 0);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: udp6_usrreq.c,v 1.135 2018/02/26 09:04:29 maxv Exp $ */
|
||||
/* $NetBSD: udp6_usrreq.c,v 1.136 2018/02/28 11:09:03 maxv Exp $ */
|
||||
/* $KAME: udp6_usrreq.c,v 1.86 2001/05/27 17:33:00 itojun Exp $ */
|
||||
/* $KAME: udp6_output.c,v 1.43 2001/10/15 09:19:52 itojun Exp $ */
|
||||
|
||||
@ -63,7 +63,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: udp6_usrreq.c,v 1.135 2018/02/26 09:04:29 maxv Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: udp6_usrreq.c,v 1.136 2018/02/28 11:09:03 maxv Exp $");
|
||||
|
||||
#ifdef _KERNEL_OPT
|
||||
#include "opt_inet.h"
|
||||
@ -354,7 +354,6 @@ udp6_sendup(struct mbuf *m, int off /* offset of data portion */,
|
||||
#if defined(IPSEC)
|
||||
/* check AH/ESP integrity. */
|
||||
if (ipsec_used && ipsec_in_reject(m, in6p)) {
|
||||
IPSEC6_STATINC(IPSEC_STAT_IN_POLVIO);
|
||||
if ((n = m_copypacket(m, M_DONTWAIT)) != NULL)
|
||||
icmp6_error(n, ICMP6_DST_UNREACH,
|
||||
ICMP6_DST_UNREACH_ADMIN, 0);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ipsec_private.h,v 1.5 2017/07/27 06:59:28 ozaki-r Exp $ */
|
||||
/* $NetBSD: ipsec_private.h,v 1.6 2018/02/28 11:09:03 maxv Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2008 The NetBSD Foundation, Inc.
|
||||
@ -49,7 +49,6 @@ extern percpu_t *pfkeystat_percpu;
|
||||
|
||||
#define IPSEC6_STAT_GETREF() IPSEC_STAT_GETREF()
|
||||
#define IPSEC6_STAT_PUTREF() IPSEC_STAT_PUTREF()
|
||||
#define IPSEC6_STATINC(x) IPSEC_STATINC(x)
|
||||
|
||||
#define AH_STATINC(x) _NET_STATINC(ahstat_percpu, x)
|
||||
#define AH_STATADD(x, v) _NET_STATADD(ahstat_percpu, x, v)
|
||||
|
Loading…
Reference in New Issue
Block a user