From 84fa01a154240badc737ffde5f9cf2871e49c71d Mon Sep 17 00:00:00 2001 From: peter Date: Tue, 26 Jul 2005 13:09:23 +0000 Subject: [PATCH] pf_test() can set *mp to NULL, check for this before de-referencing it. From Akihiro Sagawa in PR/30835. --- sys/dist/pf/net/pf_ioctl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dist/pf/net/pf_ioctl.c b/sys/dist/pf/net/pf_ioctl.c index bc75850907b1..a5e26e3b4b60 100644 --- a/sys/dist/pf/net/pf_ioctl.c +++ b/sys/dist/pf/net/pf_ioctl.c @@ -1,4 +1,4 @@ -/* $NetBSD: pf_ioctl.c,v 1.17 2005/07/01 12:37:35 peter Exp $ */ +/* $NetBSD: pf_ioctl.c,v 1.18 2005/07/26 13:09:23 peter Exp $ */ /* $OpenBSD: pf_ioctl.c,v 1.139 2005/03/03 07:13:39 dhartmei Exp $ */ /* @@ -2995,7 +2995,7 @@ pfil4_wrapper(void *arg, struct mbuf **mp, struct ifnet *ifp, int dir) * we're not compatible with fast-forward. */ - if (dir == PFIL_IN) { + if (dir == PFIL_IN && *mp) { (*mp)->m_flags &= ~M_CANFASTFWD; }