diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2006-07-24 19:58:40 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2006-07-24 19:58:40 +0000 |
commit | 88551701a54cf3b84b91890f7810cc4cc60fcecb (patch) | |
tree | c6908120d6dcd2c4ab13270c0d5c4b1b2e37f500 /usr/local/www | |
parent | 8bddc5b7837cd28c6a648dea0ff00550356aa571 (diff) | |
download | pfsense-88551701a54cf3b84b91890f7810cc4cc60fcecb.zip pfsense-88551701a54cf3b84b91890f7810cc4cc60fcecb.tar.gz |
Do not allow operator to add a interface ip address as a gateway pool member. Routing loops are bad, mmmmmkay?
Diffstat (limited to 'usr/local/www')
-rwxr-xr-x | usr/local/www/load_balancer_pool_edit.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/usr/local/www/load_balancer_pool_edit.php b/usr/local/www/load_balancer_pool_edit.php index 221fc57..c3e31c1 100755 --- a/usr/local/www/load_balancer_pool_edit.php +++ b/usr/local/www/load_balancer_pool_edit.php @@ -93,6 +93,18 @@ if ($_POST) { } } + /* make sure that we are not entering a interface ip as a gateway. This creates a routing loop. */ + if($_POST['type'] == "gateway") { + $ifdescrs = array ("wan"); + for ($j = 1; isset ($config['interfaces']['opt' . $j]); $j++) { + $ifdescrs['opt' . $j] = "opt" . $j; + } + foreach($ifdescrs as $iface) { + if($iface['gateway'] == $_POST['gateway']) + $input_errors[] = "{$iface['gateway']} is currently being referenced by a interface ip address."; + } + } + if($POST['type'] == "server") { if ($_POST['monitor'] != "TCP" && $_POST['monitor'] != "HTTP" && $_POST['monitor'] != "ICMP") $input_errors[] = "Invalid monitor chosen."; |