Source-Changes-HG archive

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

[src/trunk]: src/sys Sprinkle more soroverflow().



details:   https://anonhg.NetBSD.org/src/rev/12eca76522e7
branches:  trunk
changeset: 360653:12eca76522e7
user:      roy <roy%NetBSD.org@localhost>
date:      Wed Mar 21 14:23:54 2018 +0000

description:
Sprinkle more soroverflow().

diffstat:

 sys/netatalk/ddp_input.c  |  5 +++--
 sys/netcan/can.c          |  5 +++--
 sys/netinet/ip_mroute.c   |  5 +++--
 sys/netinet/raw_ip.c      |  6 +++---
 sys/netinet6/icmp6.c      |  7 ++++---
 sys/netinet6/ip6_input.c  |  6 +++---
 sys/netinet6/ip6_mroute.c |  5 +++--
 sys/netinet6/raw_ip6.c    |  7 ++++---
 8 files changed, 26 insertions(+), 20 deletions(-)

diffs (229 lines):

diff -r 06f50541073c -r 12eca76522e7 sys/netatalk/ddp_input.c
--- a/sys/netatalk/ddp_input.c  Wed Mar 21 12:37:12 2018 +0000
+++ b/sys/netatalk/ddp_input.c  Wed Mar 21 14:23:54 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ddp_input.c,v 1.30 2018/02/17 19:10:18 rjs Exp $        */
+/*     $NetBSD: ddp_input.c,v 1.31 2018/03/21 14:23:54 roy Exp $        */
 
 /*
  * Copyright (c) 1990,1994 Regents of The University of Michigan.
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ddp_input.c,v 1.30 2018/02/17 19:10:18 rjs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ddp_input.c,v 1.31 2018/03/21 14:23:54 roy Exp $");
 #include "opt_atalk.h"
 
 #include <sys/param.h>
@@ -316,6 +316,7 @@
        if (sbappendaddr(&ddp->ddp_socket->so_rcv, (struct sockaddr *) & from,
                         m, (struct mbuf *) 0) == 0) {
                DDP_STATINC(DDP_STAT_NOSOCKSPACE);
+               soroverflow(ddp->ddp_socket);
                m_freem(m);
                return;
        }
diff -r 06f50541073c -r 12eca76522e7 sys/netcan/can.c
--- a/sys/netcan/can.c  Wed Mar 21 12:37:12 2018 +0000
+++ b/sys/netcan/can.c  Wed Mar 21 14:23:54 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: can.c,v 1.2 2017/05/27 21:02:56 bouyer Exp $   */
+/*     $NetBSD: can.c,v 1.3 2018/03/21 14:23:54 roy Exp $      */
 
 /*-
  * Copyright (c) 2003, 2017 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: can.c,v 1.2 2017/05/27 21:02:56 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: can.c,v 1.3 2018/03/21 14:23:54 roy Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -397,6 +397,7 @@
                        if (sbappendaddr(&canp->canp_socket->so_rcv,
                                         (struct sockaddr *) &from, mc,
                                         (struct mbuf *) 0) == 0) {
+                               soroverflow(canp->canp_socket);
                                m_freem(mc);
                        } else
                                sorwakeup(canp->canp_socket);
diff -r 06f50541073c -r 12eca76522e7 sys/netinet/ip_mroute.c
--- a/sys/netinet/ip_mroute.c   Wed Mar 21 12:37:12 2018 +0000
+++ b/sys/netinet/ip_mroute.c   Wed Mar 21 14:23:54 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ip_mroute.c,v 1.154 2018/02/09 08:03:33 maxv Exp $     */
+/*     $NetBSD: ip_mroute.c,v 1.155 2018/03/21 14:23:54 roy Exp $      */
 
 /*
  * Copyright (c) 1992, 1993
@@ -93,7 +93,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip_mroute.c,v 1.154 2018/02/09 08:03:33 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip_mroute.c,v 1.155 2018/03/21 14:23:54 roy Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -1244,6 +1244,7 @@
                        sorwakeup(s);
                        return 0;
                }
+               soroverflow(s);
        }
        m_freem(mm);
        return -1;
diff -r 06f50541073c -r 12eca76522e7 sys/netinet/raw_ip.c
--- a/sys/netinet/raw_ip.c      Wed Mar 21 12:37:12 2018 +0000
+++ b/sys/netinet/raw_ip.c      Wed Mar 21 14:23:54 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: raw_ip.c,v 1.171 2018/02/28 11:23:24 maxv Exp $        */
+/*     $NetBSD: raw_ip.c,v 1.172 2018/03/21 14:23:54 roy Exp $ */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -65,7 +65,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: raw_ip.c,v 1.171 2018/02/28 11:23:24 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: raw_ip.c,v 1.172 2018/03/21 14:23:54 roy Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -146,7 +146,7 @@
            || SOOPT_TIMESTAMP(last->inp_socket->so_options))
                ip_savecontrol(last, &opts, ip, n);
        if (sbappendaddr(&last->inp_socket->so_rcv, sa, n, opts) == 0) {
-               /* should notify about lost packet */
+               soroverflow(last->inp_socket);
                m_freem(n);
                if (opts)
                        m_freem(opts);
diff -r 06f50541073c -r 12eca76522e7 sys/netinet6/icmp6.c
--- a/sys/netinet6/icmp6.c      Wed Mar 21 12:37:12 2018 +0000
+++ b/sys/netinet6/icmp6.c      Wed Mar 21 14:23:54 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: icmp6.c,v 1.223 2018/02/28 11:23:24 maxv Exp $ */
+/*     $NetBSD: icmp6.c,v 1.224 2018/03/21 14:23:54 roy Exp $  */
 /*     $KAME: icmp6.c,v 1.217 2001/06/20 15:03:29 jinmei Exp $ */
 
 /*
@@ -62,7 +62,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: icmp6.c,v 1.223 2018/02/28 11:23:24 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: icmp6.c,v 1.224 2018/03/21 14:23:54 roy Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -2014,7 +2014,7 @@
                                m_adj(n, off);
                                if (sbappendaddr(&last->in6p_socket->so_rcv,
                                    sin6tosa(&rip6src), n, opts) == 0) {
-                                       /* should notify about lost packet */
+                                       soroverflow(last->in6p_socket);
                                        m_freem(n);
                                        if (opts)
                                                m_freem(opts);
@@ -2040,6 +2040,7 @@
                m_adj(m, off);
                if (sbappendaddr(&last->in6p_socket->so_rcv,
                    sin6tosa(&rip6src), m, opts) == 0) {
+                       soroverflow(last->in6p_socket);
                        m_freem(m);
                        if (opts)
                                m_freem(opts);
diff -r 06f50541073c -r 12eca76522e7 sys/netinet6/ip6_input.c
--- a/sys/netinet6/ip6_input.c  Wed Mar 21 12:37:12 2018 +0000
+++ b/sys/netinet6/ip6_input.c  Wed Mar 21 14:23:54 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ip6_input.c,v 1.194 2018/03/06 17:39:36 maxv Exp $     */
+/*     $NetBSD: ip6_input.c,v 1.195 2018/03/21 14:23:54 roy Exp $      */
 /*     $KAME: ip6_input.c,v 1.188 2001/03/29 05:34:31 itojun Exp $     */
 
 /*
@@ -62,7 +62,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip6_input.c,v 1.194 2018/03/06 17:39:36 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip6_input.c,v 1.195 2018/03/21 14:23:54 roy Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_gateway.h"
@@ -1298,8 +1298,8 @@
 
        if (sbappendaddr(&so->so_rcv, (const struct sockaddr *)dst, NULL, m_mtu)
            == 0) {
+               soroverflow(so);
                m_freem(m_mtu);
-               /* XXX: should count statistics */
        } else
                sorwakeup(so);
 
diff -r 06f50541073c -r 12eca76522e7 sys/netinet6/ip6_mroute.c
--- a/sys/netinet6/ip6_mroute.c Wed Mar 21 12:37:12 2018 +0000
+++ b/sys/netinet6/ip6_mroute.c Wed Mar 21 14:23:54 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ip6_mroute.c,v 1.122 2018/02/06 06:32:25 maxv Exp $    */
+/*     $NetBSD: ip6_mroute.c,v 1.123 2018/03/21 14:23:54 roy Exp $     */
 /*     $KAME: ip6_mroute.c,v 1.49 2001/07/25 09:21:18 jinmei Exp $     */
 
 /*
@@ -117,7 +117,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip6_mroute.c,v 1.122 2018/02/06 06:32:25 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip6_mroute.c,v 1.123 2018/03/21 14:23:54 roy Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -1016,6 +1016,7 @@
                        sorwakeup(s);
                        return 0;
                }
+               soroverflow(s);
        }
        m_freem(mm);
        return -1;
diff -r 06f50541073c -r 12eca76522e7 sys/netinet6/raw_ip6.c
--- a/sys/netinet6/raw_ip6.c    Wed Mar 21 12:37:12 2018 +0000
+++ b/sys/netinet6/raw_ip6.c    Wed Mar 21 14:23:54 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: raw_ip6.c,v 1.165 2018/02/28 11:23:24 maxv Exp $       */
+/*     $NetBSD: raw_ip6.c,v 1.166 2018/03/21 14:23:54 roy Exp $        */
 /*     $KAME: raw_ip6.c,v 1.82 2001/07/23 18:57:56 jinmei Exp $        */
 
 /*
@@ -62,7 +62,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: raw_ip6.c,v 1.165 2018/02/28 11:23:24 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: raw_ip6.c,v 1.166 2018/03/21 14:23:54 roy Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ipsec.h"
@@ -205,7 +205,7 @@
                                m_adj(n, *offp);
                                if (sbappendaddr(&last->in6p_socket->so_rcv,
                                    sin6tosa(&rip6src), n, opts) == 0) {
-                                       /* should notify about lost packet */
+                                       soroverflow(last->in6p_socket);
                                        m_freem(n);
                                        if (opts)
                                                m_freem(opts);
@@ -232,6 +232,7 @@
                m_adj(m, *offp);
                if (sbappendaddr(&last->in6p_socket->so_rcv,
                    sin6tosa(&rip6src), m, opts) == 0) {
+                       soroverflow(last->in6p_socket);
                        m_freem(m);
                        if (opts)
                                m_freem(opts);



Home | Main Index | Thread Index | Old Index