Source-Changes-HG archive

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

[src/trunk]: src/sys Add KASSERTs, we don't want m_nextpkt in ipsec{4/6}_proc...



details:   https://anonhg.NetBSD.org/src/rev/043ab64eeac7
branches:  trunk
changeset: 830265:043ab64eeac7
user:      maxv <maxv%NetBSD.org@localhost>
date:      Sat Mar 03 09:39:29 2018 +0000

description:
Add KASSERTs, we don't want m_nextpkt in ipsec{4/6}_process_packet.

diffstat:

 sys/netinet/ip_output.c     |  6 +++---
 sys/netipsec/ipsec_output.c |  6 ++++--
 2 files changed, 7 insertions(+), 5 deletions(-)

diffs (61 lines):

diff -r e62a4c19735c -r 043ab64eeac7 sys/netinet/ip_output.c
--- a/sys/netinet/ip_output.c   Sat Mar 03 07:26:37 2018 +0000
+++ b/sys/netinet/ip_output.c   Sat Mar 03 09:39:29 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ip_output.c,v 1.297 2018/02/27 15:01:30 maxv Exp $     */
+/*     $NetBSD: ip_output.c,v 1.298 2018/03/03 09:39:29 maxv Exp $     */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -91,7 +91,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip_output.c,v 1.297 2018/02/27 15:01:30 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip_output.c,v 1.298 2018/03/03 09:39:29 maxv Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -760,7 +760,7 @@
 
        for (; m; m = m0) {
                m0 = m->m_nextpkt;
-               m->m_nextpkt = 0;
+               m->m_nextpkt = NULL;
                if (error) {
                        m_freem(m);
                        continue;
diff -r e62a4c19735c -r 043ab64eeac7 sys/netipsec/ipsec_output.c
--- a/sys/netipsec/ipsec_output.c       Sat Mar 03 07:26:37 2018 +0000
+++ b/sys/netipsec/ipsec_output.c       Sat Mar 03 09:39:29 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ipsec_output.c,v 1.69 2018/02/26 06:34:39 maxv Exp $   */
+/*     $NetBSD: ipsec_output.c,v 1.70 2018/03/03 09:39:29 maxv Exp $   */
 
 /*
  * Copyright (c) 2002, 2003 Sam Leffler, Errno Consulting
@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ipsec_output.c,v 1.69 2018/02/26 06:34:39 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ipsec_output.c,v 1.70 2018/03/03 09:39:29 maxv Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_inet.h"
@@ -466,6 +466,7 @@
        int setdf;
 
        KASSERT(m != NULL);
+       KASSERT(m->m_nextpkt == NULL);
        KASSERT(isr != NULL);
 
        s = splsoftnet();       /* insure SA contents don't change */
@@ -718,6 +719,7 @@
        union sockaddr_union *dst;
 
        KASSERT(m != NULL);
+       KASSERT(m->m_nextpkt == NULL);
        KASSERT(isr != NULL);
 
        s = splsoftnet();   /* insure SA contents don't change */



Home | Main Index | Thread Index | Old Index