From 08067906ea76c56227c05eb451a3ba03caa7079b Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Thu, 21 Apr 2016 11:48:06 +0545 Subject: Fix #6173 Use correct list of special nets is_specialnet() was only using a smaller list of "special nets", so when you have a VIP as the selected special destination it was not matching it up on edit, and thus "forgetting" the special VIP selection. build_dsttype_list() already makes a good list of special destination types. That list includes all the "special" VIPs. --- src/usr/local/www/firewall_nat_edit.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/usr/local/www/firewall_nat_edit.php b/src/usr/local/www/firewall_nat_edit.php index 4c076af..86dd81e 100644 --- a/src/usr/local/www/firewall_nat_edit.php +++ b/src/usr/local/www/firewall_nat_edit.php @@ -631,16 +631,14 @@ function dsttype_selected() { global $pconfig, $config; $selected = ""; - - $sel = is_specialnet($pconfig['dst']); - if (!$sel) { + if (array_key_exists($pconfig['dst'], build_dsttype_list())) { + $selected = $pconfig['dst']; + } else { if ($pconfig['dstmask'] == 32) { $selected = 'single'; } else { $selected = 'network'; } - } else { - $selected = $pconfig['dst']; } return($selected); -- cgit v1.1