From 37d202a3bd354e553b63ab9b265bd68dafef7fc5 Mon Sep 17 00:00:00 2001 From: Ermal Date: Fri, 10 Dec 2010 22:46:31 +0000 Subject: [PATCH] Do not allow gateways to be selected without a direction. --- usr/local/www/firewall_rules_edit.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/usr/local/www/firewall_rules_edit.php b/usr/local/www/firewall_rules_edit.php index 9dbabc6965..1c6c3f0195 100755 --- a/usr/local/www/firewall_rules_edit.php +++ b/usr/local/www/firewall_rules_edit.php @@ -364,6 +364,8 @@ if ($_POST) { } if (isset($_POST['floating']) && $_POST['pdnpipe'] != "none" && (empty($_POST['direction']) || $_POST['direction'] == "any")) $input_errors[] = gettext("You can not use limiters in Floating rules without choosing a direction."); + if (isset($_POST['floating']) && $_POST['gateway'] != "default" && (empty($_POST['direction']) || $_POST['direction'] == "any")) + $input_errors[] = gettext("You can not use gateways in Floating rules without choosing a direction."); if ($_POST['pdnpipe'] && $_POST['pdnpipe'] != "none") { if ($_POST['dnpipe'] == "none" ) $input_errors[] = gettext("You must select a queue for the In direction before selecting one for Out too.");