diff options
author | Niels Provos <provos@cvs.openbsd.org> | 2001-06-26 04:00:30 +0000 |
---|---|---|
committer | Niels Provos <provos@cvs.openbsd.org> | 2001-06-26 04:00:30 +0000 |
commit | f6d7a4c99d23c9e56c0a2516dd28d2786f45d938 (patch) | |
tree | 65dc45cde893d4cbd089d851a104fa6c237dd5e6 /sys | |
parent | 91dba6ee0a24c0f4937b18fe212e16bd7542cb96 (diff) |
pflog_packet fails on NULL mbuf
Diffstat (limited to 'sys')
-rw-r--r-- | sys/net/pf.c | 5 |
1 files changed, 4 insertions, 1 deletions
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) |