Source-Changes-HG archive

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

[src/trunk]: src/sys/net/npf Update the pointer when fast-kicking, because it...



details:   https://anonhg.NetBSD.org/src/rev/f83d840c8176
branches:  trunk
changeset: 320503:f83d840c8176
user:      maxv <maxv%NetBSD.org@localhost>
date:      Tue Jul 10 14:04:07 2018 +0000

description:
Update the pointer when fast-kicking, because it may have been freed.
Before my changes the nonsensical pointer ininitialization held, but
when I started introducing sanity checks the whole thing collapsed.

Need pullup-8.

diffstat:

 sys/net/npf/npf_handler.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r acf67be8c522 -r f83d840c8176 sys/net/npf/npf_handler.c
--- a/sys/net/npf/npf_handler.c Tue Jul 10 13:36:51 2018 +0000
+++ b/sys/net/npf/npf_handler.c Tue Jul 10 14:04:07 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: npf_handler.c,v 1.40 2018/07/10 12:31:46 maxv Exp $    */
+/*     $NetBSD: npf_handler.c,v 1.41 2018/07/10 14:04:07 maxv Exp $    */
 
 /*-
  * Copyright (c) 2009-2013 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
 
 #ifdef _KERNEL
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: npf_handler.c,v 1.40 2018/07/10 12:31:46 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: npf_handler.c,v 1.41 2018/07/10 14:04:07 maxv Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -160,6 +160,7 @@
 
        /* If error on the format, leave quickly. */
        if (flags & NPC_FMTERR) {
+               *mp = nbuf_head_mbuf(&nbuf);
                error = EINVAL;
                goto fastout;
        }



Home | Main Index | Thread Index | Old Index