diff options
author | Renato Botelho <garga@FreeBSD.org> | 2013-01-05 12:08:39 -0200 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2013-01-05 12:13:55 -0200 |
commit | e99ba2d66e915904626fd90ecc87711169189bdc (patch) | |
tree | f8f5365492cf5d47df27236887b7365e186a080d /usr/local/www/firewall_nat_out.php | |
parent | aca65de524027e9aedfa38f83665907b41abce58 (diff) | |
download | pfsense-e99ba2d66e915904626fd90ecc87711169189bdc.zip pfsense-e99ba2d66e915904626fd90ecc87711169189bdc.tar.gz |
Fix outbound NAT rules when interface is deleted:
- When delete interface, do not touch outbound NAT rules
- Skip outbound NAT rules when interface doesn't exist
- Bump latest_config to 9.2
- Since rules with no interface were considered as wan, convert old
rules adding interface 'wan' to avoid breaking old configs
It should fix #2338
Diffstat (limited to 'usr/local/www/firewall_nat_out.php')
-rwxr-xr-x | usr/local/www/firewall_nat_out.php | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/usr/local/www/firewall_nat_out.php b/usr/local/www/firewall_nat_out.php index 7485965..3c3fc54 100755 --- a/usr/local/www/firewall_nat_out.php +++ b/usr/local/www/firewall_nat_out.php @@ -368,16 +368,19 @@ include("head.inc"); </td> </tr> <?php $nnats = $i = 0; foreach ($a_out as $natent): ?> + <?php + global $FilterIflist; + if(empty($FilterIflist)) { + filter_generate_optcfg_array(); + } + if (!$natent['interface'] || !isset($FilterIflist[$natent['interface']])) + continue; + ?> <tr valign="top" id="fr<?=$nnats;?>"> <td class="listt"><input type="checkbox" id="frc<?=$nnats;?>" name="rule[]" value="<?=$i;?>" onClick="fr_bgcolor('<?=$nnats;?>')" style="margin: 0; padding: 0; width: 15px; height: 15px;"></td> <td class="listt" align="center"></td> <td class="listlr" onClick="fr_toggle(<?=$nnats;?>)" id="frd<?=$nnats;?>" ondblclick="document.location='firewall_nat_out_edit.php?id=<?=$nnats;?>';"> - <?php - if (!$natent['interface']) - echo htmlspecialchars(convert_friendly_interface_to_friendly_descr("wan")); - else - echo htmlspecialchars(convert_friendly_interface_to_friendly_descr($natent['interface'])); - ?> + <?php echo htmlspecialchars(convert_friendly_interface_to_friendly_descr($natent['interface'])); ?> </td> <td class="listr" onClick="fr_toggle(<?=$nnats;?>)" id="frd<?=$nnats;?>" ondblclick="document.location='firewall_nat_out_edit.php?id=<?=$nnats;?>';"> |