diff options
author | Niels Provos <provos@cvs.openbsd.org> | 2001-06-26 17:45:58 +0000 |
---|---|---|
committer | Niels Provos <provos@cvs.openbsd.org> | 2001-06-26 17:45:58 +0000 |
commit | 129d1ee26a72314f35ec2870b10af0b4a73d3e87 (patch) | |
tree | d4ba1f6a5eef93b98d5f253751eea8d5e705cd19 | |
parent | 06638aa29ef8c572533aea2421eff146a25a88dc (diff) |
deal with NULL rule being passed to logging
-rw-r--r-- | sys/net/pf.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/net/pf.c b/sys/net/pf.c index d3c715f61a7..cf556577fa0 100644 --- a/sys/net/pf.c +++ b/sys/net/pf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf.c,v 1.53 2001/06/26 15:58:42 provos Exp $ */ +/* $OpenBSD: pf.c,v 1.54 2001/06/26 17:45:57 provos Exp $ */ /* * Copyright (c) 2001, Daniel Hartmeier @@ -360,7 +360,7 @@ pflog_packet(struct mbuf *m, int af, u_short dir, u_short reason, u_short nr, struct pf_rule *rm) { #if NBPFILTER > 0 - struct ifnet *ifn, *ifp = rm->ifp; + struct ifnet *ifn, *ifp = NULL; struct pfloghdr hdr; struct mbuf m1; @@ -369,6 +369,8 @@ pflog_packet(struct mbuf *m, int af, u_short dir, u_short reason, hdr.af = htonl(af); /* Set the right interface name */ + if (rm != NULL) + ifp = rm->ifp; if (m->m_pkthdr.rcvif != NULL) ifp = m->m_pkthdr.rcvif; if (ifp != NULL) |