Skip to content

Commit

Permalink
Merge branch 'freebsd/11-stable/master' into hardened/11-stable/master
Browse files Browse the repository at this point in the history
* freebsd/11-stable/master:
  MFC r336273:
  MFC r336275:
  • Loading branch information
opntr-auto committed Jul 21, 2018
2 parents da92d11 + 0873e9e commit b15a075
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
8 changes: 5 additions & 3 deletions sys/netpfil/pf/pf.c
Original file line number Diff line number Diff line change
Expand Up @@ -3544,9 +3544,11 @@ pf_test_rule(struct pf_rule **rm, struct pf_state **sm, int direction,
action = pf_create_state(r, nr, a, pd, nsn, nk, sk, m, off,
sport, dport, &rewrite, kif, sm, tag, bproto_sum, bip_sum,
hdrlen);
if (action != PF_PASS && r->rule_flag & PFRULE_RETURN) {
pf_return(r, nr, pd, sk, off, m, th, kif,
bproto_sum, bip_sum, hdrlen, &reason);
if (action != PF_PASS) {
if (action == PF_DROP &&
(r->rule_flag & PFRULE_RETURN))
pf_return(r, nr, pd, sk, off, m, th, kif,
bproto_sum, bip_sum, hdrlen, &reason);
return (action);
}
} else {
Expand Down
3 changes: 2 additions & 1 deletion sys/netpfil/pf/pf_ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -3938,7 +3938,6 @@ pf_unload_vnet(void)

V_pf_vnet_active = 0;
V_pf_status.running = 0;
swi_remove(V_pf_swi_cookie);
error = dehook_pf();
if (error) {
/*
Expand All @@ -3956,6 +3955,8 @@ pf_unload_vnet(void)
shutdown_pf();
PF_RULES_WUNLOCK();

swi_remove(V_pf_swi_cookie);

pf_normalize_cleanup();
PF_RULES_WLOCK();
pfi_cleanup_vnet();
Expand Down

0 comments on commit b15a075

Please sign in to comment.