Module Name:    src
Committed By:   martin
Date:           Tue Jul 10 14:44:05 UTC 2018

Modified Files:
        src/sys/net/npf [netbsd-8]: npf_handler.c

Log Message:
Pull up following revision(s) (requested by maxv in ticket #919):

        sys/net/npf/npf_handler.c: revision 1.41

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.


To generate a diff of this commit:
cvs rdiff -u -r1.37.6.1 -r1.37.6.2 src/sys/net/npf/npf_handler.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/net/npf/npf_handler.c
diff -u src/sys/net/npf/npf_handler.c:1.37.6.1 src/sys/net/npf/npf_handler.c:1.37.6.2
--- src/sys/net/npf/npf_handler.c:1.37.6.1	Wed May  9 15:35:37 2018
+++ src/sys/net/npf/npf_handler.c	Tue Jul 10 14:44:05 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: npf_handler.c,v 1.37.6.1 2018/05/09 15:35:37 martin Exp $	*/
+/*	$NetBSD: npf_handler.c,v 1.37.6.2 2018/07/10 14:44:05 martin 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.37.6.1 2018/05/09 15:35:37 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: npf_handler.c,v 1.37.6.2 2018/07/10 14:44:05 martin Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -159,6 +159,7 @@ npf_packet_handler(npf_t *npf, struct mb
 
 	/* If error on the format, leave quickly. */
 	if (flags & NPC_FMTERR) {
+		*mp = nbuf_head_mbuf(&nbuf);
 		error = EINVAL;
 		goto fastout;
 	}

Reply via email to