From 2f678757bf78bb9525be8f211da8e6a81f5ccf6e Mon Sep 17 00:00:00 2001 From: Ermal Date: Wed, 31 Mar 2010 10:33:54 +0000 Subject: [PATCH] Do not create faulty gateway entires with just defaultgw set it breaks logic. --- usr/local/www/interfaces.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/usr/local/www/interfaces.php b/usr/local/www/interfaces.php index 9cf592e583..cb6466f17e 100755 --- a/usr/local/www/interfaces.php +++ b/usr/local/www/interfaces.php @@ -490,10 +490,8 @@ if ($_POST) { /* for dynamic interfaces we tack a gateway item onto the array to prevent system * log messages from appearing. They can also manually add these items */ /* 1st added gateway gets a default bit */ - $gateway_item = array(); - if(empty($a_gateways)) { - $gateway_item['defaultgw'] = "true"; - } else { + if(!empty($a_gateways)) { + $gateway_item = array(); /* check for duplicates */ $skip = false; foreach($a_gateways as $item) {