Simplify logic added in r285945 as suggested by glebius
Approved by: glebius MFC after: 3 days Sponsored by: Netgate
This commit is contained in:
parent
f4b37ed0f8
commit
299c819a75
@ -5895,8 +5895,7 @@ pf_test(int dir, struct ifnet *ifp, struct mbuf **m0, struct inpcb *inp)
|
||||
!((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 @@ pf_test6(int dir, struct ifnet *ifp, struct mbuf **m0, struct inpcb *inp)
|
||||
!((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"));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user