diff options
author | Phil Davis <phil.davis@inf.org> | 2016-04-21 11:48:06 +0545 |
---|---|---|
committer | Chris Buechler <cmb@pfsense.org> | 2016-04-21 03:52:38 -0500 |
commit | 08067906ea76c56227c05eb451a3ba03caa7079b (patch) | |
tree | a6ea3cef1004d5799663b17b9bdacfc1356ba0d2 /src/usr/local/www/firewall_nat_edit.php | |
parent | 6ecf66a930a1924b65886e06a2d2fa2dc864bcf3 (diff) | |
download | pfsense-08067906ea76c56227c05eb451a3ba03caa7079b.zip pfsense-08067906ea76c56227c05eb451a3ba03caa7079b.tar.gz |
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.
Diffstat (limited to 'src/usr/local/www/firewall_nat_edit.php')
-rw-r--r-- | src/usr/local/www/firewall_nat_edit.php | 8 |
1 files changed, 3 insertions, 5 deletions
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); |