From 0167a9bff5bafa7428ca2f4fdd85f5eabe25144c Mon Sep 17 00:00:00 2001 From: Erik Fonnesbeck Date: Thu, 6 May 2010 02:47:06 -0600 Subject: Fix the regular expression used in filter_generate_address for OPT subnet so that it only matches the case intended. Ticket #571 --- etc/inc/filter.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'etc') diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc index 5fe7d56..829082c 100644 --- a/etc/inc/filter.inc +++ b/etc/inc/filter.inc @@ -1370,7 +1370,7 @@ function filter_generate_address(& $rule, $target = "source", $isnat = false) { if(strstr($rule[$target]['network'], "opt")) { $optmatch = ""; $matches = ""; - if(preg_match("/opt([0-9]*)/", $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 ""; -- cgit v1.1