1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-17 10:26:15 +00:00

Simplify logic added in r285945 as suggested by glebius

Approved by:	glebius
MFC after:	3 days
Sponsored by:	Netgate
This commit is contained in:
Renato Botelho 2015-07-28 14:59:29 +00:00
parent f4b37ed0f8
commit 299c819a75
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=285960

View File

@ -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"));
}