diff options
author | Mike Belopuhov <mikeb@cvs.openbsd.org> | 2012-06-26 13:14:43 +0000 |
---|---|---|
committer | Mike Belopuhov <mikeb@cvs.openbsd.org> | 2012-06-26 13:14:43 +0000 |
commit | d3f2cc9579b395ed71bc0b43ff8152d9e2e6a2ca (patch) | |
tree | 6dc1242d9bffcc0d3a6cdb22cc26ccbed15fbfc5 /sys/net | |
parent | 6f0b85e88dc521919ea3deadd32c18ba6f5b36c4 (diff) |
initialize 'reason' variable before passing it to the pflog_packet;
from david hill; ok henning
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/pf.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/net/pf.c b/sys/net/pf.c index 9dc8646b6b5..7d681d02aab 100644 --- a/sys/net/pf.c +++ b/sys/net/pf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf.c,v 1.805 2012/05/12 13:08:48 mpf Exp $ */ +/* $OpenBSD: pf.c,v 1.806 2012/06/26 13:14:42 mikeb Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -3491,15 +3491,19 @@ pf_test_rule(struct pf_pdesc *pd, struct pf_rule **rm, struct pf_state **sm, REASON_SET(&reason, PFRES_MEMORY); goto cleanup; } - if (r->log || act.log & PF_LOG_MATCHES) + if (r->log || act.log & PF_LOG_MATCHES) { + REASON_SET(&reason, PFRES_MATCH); PFLOG_PACKET(pd, reason, r, a, ruleset); + } } else { match = 1; *rm = r; *am = a; *rsm = ruleset; - if (act.log & PF_LOG_MATCHES) + if (act.log & PF_LOG_MATCHES) { + REASON_SET(&reason, PFRES_MATCH); PFLOG_PACKET(pd, reason, r, a, ruleset); + } } if ((*rm)->quick) |