Source-Changes-HG archive

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

[src/trunk]: src/sys Fix PR kern/52910. Reported and implemented a patch by S...



details:   https://anonhg.NetBSD.org/src/rev/761f9517f29c
branches:  trunk
changeset: 358575:761f9517f29c
user:      knakahara <knakahara%NetBSD.org@localhost>
date:      Mon Jan 08 23:23:25 2018 +0000

description:
Fix PR kern/52910. Reported and implemented a patch by Sevan Janiyan, thanks.

diffstat:

 sys/netinet6/ip6_flow.c |  12 +++++++++---
 sys/opencrypto/crypto.c |   6 +++---
 2 files changed, 12 insertions(+), 6 deletions(-)

diffs (68 lines):

diff -r 95496d32eef6 -r 761f9517f29c sys/netinet6/ip6_flow.c
--- a/sys/netinet6/ip6_flow.c   Mon Jan 08 18:56:20 2018 +0000
+++ b/sys/netinet6/ip6_flow.c   Mon Jan 08 23:23:25 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ip6_flow.c,v 1.36 2017/12/10 09:06:46 maxv Exp $       */
+/*     $NetBSD: ip6_flow.c,v 1.37 2018/01/08 23:23:25 knakahara Exp $  */
 
 /*-
  * Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip6_flow.c,v 1.36 2017/12/10 09:06:46 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip6_flow.c,v 1.37 2018/01/08 23:23:25 knakahara Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_net_mpsafe.h"
@@ -560,6 +560,8 @@
        struct ip6flow *ip6f;
        size_t hash;
 
+       printf("XXXX %s: enter\n", __func__);
+
        ip6 = mtod(m, const struct ip6_hdr *);
 
        KERNEL_LOCK_UNLESS_NET_MPSAFE();
@@ -571,8 +573,12 @@
         *
         * Don't create a flow for ICMPv6 messages.
         */
-       if (ip6_maxflows == 0 || ip6->ip6_nxt == IPPROTO_IPV6_ICMP)
+       if (ip6_maxflows == 0 || ip6->ip6_nxt == IPPROTO_IPV6_ICMP) {
+               printf("XXXX %s: icmp skip\n", __func__);
                goto out;
+       }
+
+       printf("XXXX %s: ip6->ip6_nxt=%d\n", __func__, ip6->ip6_nxt);
 
        /*
         * See if an existing flow exists.  If so:
diff -r 95496d32eef6 -r 761f9517f29c sys/opencrypto/crypto.c
--- a/sys/opencrypto/crypto.c   Mon Jan 08 18:56:20 2018 +0000
+++ b/sys/opencrypto/crypto.c   Mon Jan 08 23:23:25 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: crypto.c,v 1.102 2017/11/09 22:20:25 christos Exp $ */
+/*     $NetBSD: crypto.c,v 1.103 2018/01/08 23:23:25 knakahara Exp $ */
 /*     $FreeBSD: src/sys/opencrypto/crypto.c,v 1.4.2.5 2003/02/26 00:14:05 sam Exp $   */
 /*     $OpenBSD: crypto.c,v 1.41 2002/07/17 23:52:38 art Exp $ */
 
@@ -53,7 +53,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: crypto.c,v 1.102 2017/11/09 22:20:25 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: crypto.c,v 1.103 2018/01/08 23:23:25 knakahara Exp $");
 
 #include <sys/param.h>
 #include <sys/reboot.h>
@@ -360,7 +360,7 @@
 }
 
 /*
- * Crypto op and desciptor data structures are allocated
+ * Crypto op and descriptor data structures are allocated
  * from separate private zones(FreeBSD)/pools(netBSD/OpenBSD) .
  */
 static pool_cache_t cryptop_cache;



Home | Main Index | Thread Index | Old Index