From 299c819a75b9494ed8ab5a5a64f3d85db568d7e7 Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Tue, 28 Jul 2015 14:59:29 +0000 Subject: [PATCH] Simplify logic added in r285945 as suggested by glebius Approved by: glebius MFC after: 3 days Sponsored by: Netgate --- sys/netpfil/pf/pf.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 49781a827f19..fba04328237e 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -5895,8 +5895,7 @@ done: !((s && s->state_flags & PFSTATE_ALLOWOPTS) || r->allow_opts)) { action = PF_DROP; REASON_SET(&reason, PFRES_IPOPTIONS); - if (r->log) - log = 1; + log = r->log; DPFPRINTF(PF_DEBUG_MISC, ("pf: dropping packet with ip options\n")); } @@ -6330,8 +6329,7 @@ done: !((s && s->state_flags & PFSTATE_ALLOWOPTS) || r->allow_opts)) { action = PF_DROP; REASON_SET(&reason, PFRES_IPOPTIONS); - if (r->log) - log = 1; + log = r->log; DPFPRINTF(PF_DEBUG_MISC, ("pf: dropping packet with dangerous v6 headers\n")); }