diff options
author | Eirik Oeverby <ltning@anduin.net> | 2009-09-23 23:04:51 +0200 |
---|---|---|
committer | Eirik Oeverby <ltning@anduin.net> | 2009-09-23 23:04:51 +0200 |
commit | f65c2f4c428249a0eeea95f70cd5a92f907fca57 (patch) | |
tree | e515e0b40ce1a156b8150cae890a307260f7ec16 /etc | |
parent | 685c1413baffe2fe20a1ae3cc0a283b6423c194d (diff) | |
download | pfsense-f65c2f4c428249a0eeea95f70cd5a92f907fca57.zip pfsense-f65c2f4c428249a0eeea95f70cd5a92f907fca57.tar.gz |
Filter rules for interface-subnet rules fixed.
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/filter.inc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc index 71ffec8..0121f78 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 "; |