From f6d7a4c99d23c9e56c0a2516dd28d2786f45d938 Mon Sep 17 00:00:00 2001 From: Niels Provos Date: Tue, 26 Jun 2001 04:00:30 +0000 Subject: pflog_packet fails on NULL mbuf --- sys/net/pf.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/net/pf.c b/sys/net/pf.c index 2d4c8be5d7e..a12595f1b2b 100644 --- a/sys/net/pf.c +++ b/sys/net/pf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf.c,v 1.40 2001/06/26 00:11:00 dhartmei Exp $ */ +/* $OpenBSD: pf.c,v 1.41 2001/06/26 04:00:29 provos Exp $ */ /* * Copyright (c) 2001, Daniel Hartmeier @@ -362,6 +362,9 @@ pflog_packet(struct mbuf *m, int af, short dir, int nr, struct pf_rule *rm) struct pfloghdr hdr; struct mbuf m1; + if (mbuf == NULL) + return(-1); + hdr.af = htonl(af); /* Set the right interface name */ if (m->m_pkthdr.rcvif != NULL) -- cgit v1.2.3