diff options
author | smos <seth.mos@dds.nl> | 2012-05-22 08:13:50 +0200 |
---|---|---|
committer | smos <seth.mos@dds.nl> | 2012-05-22 08:13:50 +0200 |
commit | 5a61fd69c9a0efe92216be8d4feb50ceb900e8cd (patch) | |
tree | d8aa860b6b9a9a2e22ca79bacd09bbf29eddf211 /etc | |
parent | e7de69fbd5cbe9900074e890b89b644065d7a4eb (diff) | |
download | pfsense-5a61fd69c9a0efe92216be8d4feb50ceb900e8cd.zip pfsense-5a61fd69c9a0efe92216be8d4feb50ceb900e8cd.tar.gz |
Make sure that we match multiple characters.
Ticket #2415
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/filter.inc | 2 | ||||
-rw-r--r-- | etc/inc/interfaces.inc | 12 | ||||
-rw-r--r-- | etc/inc/vpn.inc | 2 |
3 files changed, 8 insertions, 8 deletions
diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc index a379ac2..3d676ca 100644 --- a/etc/inc/filter.inc +++ b/etc/inc/filter.inc @@ -3243,7 +3243,7 @@ function filter_generate_ipsec_rules() { } } - if(preg_match("/^[a-z0-9]_vip/i", $ph1ent['interface'])) { + if(preg_match("/^[a-z0-9]+_vip/i", $ph1ent['interface'])) { $parentinterface = link_carp_interface_to_parent($ph1ent['interface']); } else { $parentinterface = $ph1ent['interface']; diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc index eb4499d..6f06c7a 100644 --- a/etc/inc/interfaces.inc +++ b/etc/inc/interfaces.inc @@ -1177,7 +1177,7 @@ function interface_bring_down($interface = "wan", $destroy = false) { } if ($destroy == true) { - if (preg_match("/^[a-z0-9]_vip|^tun|^ovpn|^gif|^gre|^lagg|^bridge|vlan|^stf|^srd/i", $realif)) + if (preg_match("/^[a-z0-9]+_vip|^tun|^ovpn|^gif|^gre|^lagg|^bridge|vlan|^stf|^srd/i", $realif)) pfSense_interface_destroy($realif); } @@ -4305,7 +4305,7 @@ function get_interface_ip($interface = "wan") if (!$realif) { if (preg_match("/^carp/i", $interface)) $realif = $interface; - else if (preg_match("/^[a-z0-9]_vip/i", $interface)) + else if (preg_match("/^[a-z0-9]+_vip/i", $interface)) $realif = $interface; else return null; @@ -4331,7 +4331,7 @@ function get_interface_ipv6($interface = "wan") if (!$realif) { if (preg_match("/^carp/i", $interface)) $realif = $interface; - else if (preg_match("/^[a-z0-9]_vip/i", $interface)) + else if (preg_match("/^[a-z0-9]+_vip/i", $interface)) $realif = $interface; else return null; @@ -4350,7 +4350,7 @@ function get_interface_linklocal($interface = "wan") if (!$realif) { if (preg_match("/^carp/i", $interface)) $realif = $interface; - else if (preg_match("/^[a-z0-9]_vip/i", $interface)) + else if (preg_match("/^[a-z0-9]+_vip/i", $interface)) $realif = $interface; else return null; @@ -4369,7 +4369,7 @@ function get_interface_subnet($interface = "wan") if (!$realif) { if (preg_match("/^carp/i", $interface)) $realif = $interface; - else if (preg_match("/^[a-z0-9]_vip/i", $interface)) + else if (preg_match("/^[a-z0-9]+_vip/i", $interface)) $realif = $interface; else return null; @@ -4388,7 +4388,7 @@ function get_interface_subnetv6($interface = "wan") if (!$realif) { if (preg_match("/^carp/i", $interface)) $realif = $interface; - else if (preg_match("/^[a-z0-9]_vip/i", $interface)) + else if (preg_match("/^[a-z0-9]+_vip/i", $interface)) $realif = $interface; else return null; diff --git a/etc/inc/vpn.inc b/etc/inc/vpn.inc index 3838300..b8ba7c8 100644 --- a/etc/inc/vpn.inc +++ b/etc/inc/vpn.inc @@ -906,7 +906,7 @@ EOD; } /* static route needed? */ - if (preg_match("/^carp|^[a-z0-9]_vip/i", $ph1ent['interface'])) + if (preg_match("/^carp|^[a-z0-9]+_vip/i", $ph1ent['interface'])) $parentinterface = link_carp_interface_to_parent($ph1ent['interface']); else $parentinterface = $ph1ent['interface']; |