diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc index 71ffec8a32..0121f78910 100644 --- a/etc/inc/filter.inc +++ b/etc/inc/filter.inc @@ -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 ";