Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys Remove duplicate IPSEC_STATINC(IPSEC_STAT_IN_POLVIO), ip...



details:   https://anonhg.NetBSD.org/src/rev/31b9f6edf706
branches:  trunk
changeset: 359890:31b9f6edf706
user:      maxv <maxv%NetBSD.org@localhost>
date:      Wed Feb 28 11:09:03 2018 +0000

description:
Remove duplicate IPSEC_STATINC(IPSEC_STAT_IN_POLVIO), ipsec_in_reject
already increases it. IPSEC6_STATINC is now unused, so remove it too.

diffstat:

 sys/netinet/tcp_input.c      |  9 ++-------
 sys/netinet/udp_usrreq.c     |  5 ++---
 sys/netinet6/udp6_usrreq.c   |  5 ++---
 sys/netipsec/ipsec_private.h |  3 +--
 4 files changed, 7 insertions(+), 15 deletions(-)

diffs (126 lines):

diff -r 07433aa649b0 -r 31b9f6edf706 sys/netinet/tcp_input.c
--- a/sys/netinet/tcp_input.c   Wed Feb 28 10:34:04 2018 +0000
+++ b/sys/netinet/tcp_input.c   Wed Feb 28 11:09:03 2018 +0000
@@ -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 @@
                        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 @@
                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 @@
                                            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 @@
                                        KASSERT(sotoin6pcb(so) == in6p);
                                        if (!ipsec_in_reject(m, in6p))
                                                break;
-                                       IPSEC6_STATINC(IPSEC_STAT_IN_POLVIO);
                                        tp = NULL;
                                        goto dropwithreset;
 #endif /*INET6*/
diff -r 07433aa649b0 -r 31b9f6edf706 sys/netinet/udp_usrreq.c
--- a/sys/netinet/udp_usrreq.c  Wed Feb 28 10:34:04 2018 +0000
+++ b/sys/netinet/udp_usrreq.c  Wed Feb 28 11:09:03 2018 +0000
@@ -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 @@
 #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);
diff -r 07433aa649b0 -r 31b9f6edf706 sys/netinet6/udp6_usrreq.c
--- a/sys/netinet6/udp6_usrreq.c        Wed Feb 28 10:34:04 2018 +0000
+++ b/sys/netinet6/udp6_usrreq.c        Wed Feb 28 11:09:03 2018 +0000
@@ -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 @@
 #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);
diff -r 07433aa649b0 -r 31b9f6edf706 sys/netipsec/ipsec_private.h
--- a/sys/netipsec/ipsec_private.h      Wed Feb 28 10:34:04 2018 +0000
+++ b/sys/netipsec/ipsec_private.h      Wed Feb 28 11:09:03 2018 +0000
@@ -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 @@
 
 #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)



Home | Main Index | Thread Index | Old Index