mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Filter rules for interface-subnet rules fixed.
This commit is contained in:
parent
685c1413ba
commit
f65c2f4c42
@ -1127,14 +1127,14 @@ function filter_generate_address(& $rule, $target = "source")
|
||||
if (strstr($rule[$target]['network'], "opt")) {
|
||||
$optmatch = "";
|
||||
$matches = "";
|
||||
if (preg_match("/opt([0-9999])/", $rule[$target]['network'], $optmatch)) {
|
||||
if (preg_match("/opt([0-9]*)/", $rule[$target]['network'], $optmatch)) {
|
||||
$opt_ip = $FilterIflist["opt{$optmatch[1]}"]['ip'];
|
||||
if(!is_ipaddr($opt_ip))
|
||||
return "";
|
||||
$src = $opt_ip . "/" .
|
||||
$FilterIflist["opt{$optmatch[1]}"]['sn'];
|
||||
/* check for opt$NUMip here */
|
||||
} else if (preg_match("/opt([0-9999])ip/", $rule[$target]['network'], $matches)) {
|
||||
} else if (preg_match("/opt([0-9]*)ip/", $rule[$target]['network'], $matches)) {
|
||||
$src = $FilterIflist["opt{$matches[1]}"]['ip'];
|
||||
if (!is_ipaddr($src))
|
||||
return "";
|
||||
@ -1393,7 +1393,9 @@ function filter_generate_user_rule($rule)
|
||||
/* destination address */
|
||||
$dst = filter_generate_address($rule, "destination");
|
||||
if (empty($dst) || ($dst == "/")) {
|
||||
global $FilterIflist;
|
||||
file_put_contents('/tmp/rule_dst.array', print_r($rule, 1));
|
||||
file_put_contents('/tmp/filterIflist.dmp', print_r($FilterIflist, 1));
|
||||
return "# returning at dst $dst == \"/\"";
|
||||
}
|
||||
$aline['dst'] = "to $dst ";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user