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.
This commit is contained in:
maxv 2018-07-10 14:04:07 +00:00
parent 6814d65be3
commit 2be6e4a118
1 changed files with 3 additions and 2 deletions

View File

@ -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 @@ npf_packet_handler(npf_t *npf, struct mbuf **mp, ifnet_t *ifp, int di)
/* If error on the format, leave quickly. */
if (flags & NPC_FMTERR) {
*mp = nbuf_head_mbuf(&nbuf);
error = EINVAL;
goto fastout;
}