Skip to content

Commit

Permalink
Add 'Alias type' rules to states removal feature
Browse files Browse the repository at this point in the history
  • Loading branch information
BBcan177 authored Oct 25, 2017
1 parent fce5b76 commit 6829aa4
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5093,10 +5093,14 @@ function sync_package_pfblockerng($cron='') {
pfb_logger("{$log}", 1);

$tablesin = $tablesout = array();
// Collect all 'pfB_' Rules that are 'Block/Reject' and do not have bypass states enabled
// Collect all 'pfB_' and 'pfb_' rules that are 'Block/Reject' and do not have bypass states enabled
if (isset($config['aliases']['alias'])) {
foreach ($config['aliases']['alias'] as $alias) {
if ($alias['type'] == 'urltable' && strpos($alias['name'], 'pfB_') !== FALSE && strpos($alias['descr'], '[s]') === FALSE) {

if ($alias['type'] == 'urltable' &&
(strpos($alias['name'], 'pfB_') !== FALSE || strpos($alias['name'], 'pfb_') !== FALSE) &&
strpos($alias['descr'], '[s]') === FALSE) {

if (isset($config['filter']['rule'])) {
foreach ($config['filter']['rule'] as $rule) {
if ($alias['name'] === $rule['source']['address'] || $alias['name'] === $rule['destination']['address']) {
Expand Down

0 comments on commit 6829aa4

Please sign in to comment.