diff options
author | Renato Botelho <renato.botelho@bluepex.com> | 2010-04-08 16:46:14 -0300 |
---|---|---|
committer | Renato Botelho <renato.botelho@bluepex.com> | 2010-04-08 16:46:14 -0300 |
commit | 47c5a08f7614c796dad0e97c302a5f2d8640c758 (patch) | |
tree | 7341e3010a6598f836f06376ea9df64877ceef23 /usr | |
parent | d479c2931be0308e3e3a55e2ac767cd774724509 (diff) | |
download | pfsense-47c5a08f7614c796dad0e97c302a5f2d8640c758.zip pfsense-47c5a08f7614c796dad0e97c302a5f2d8640c758.tar.gz |
Fix table sizes and calculate local port range
Diffstat (limited to 'usr')
-rwxr-xr-x | usr/local/www/firewall_nat.php | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/usr/local/www/firewall_nat.php b/usr/local/www/firewall_nat.php index c1a146a..5a7f869 100755 --- a/usr/local/www/firewall_nat.php +++ b/usr/local/www/firewall_nat.php @@ -185,13 +185,13 @@ echo "<script type=\"text/javascript\" language=\"javascript\" src=\"/javascript <td width="3%" class="list"> </td> <td width="5%" class="listhdrr">If</td> <td width="5%" class="listhdrr">Proto</td> - <td width="20%" class="listhdrr">Src. addr</td> - <td width="20%" class="listhdrr">Src. ports</td> - <td width="20%" class="listhdrr">Dest. addr</td> - <td width="20%" class="listhdrr">Dest. ports</td> - <td width="20%" class="listhdrr">NAT IP</td> - <td width="20%" class="listhdrr">NAT Ports</td> - <td width="20%" class="listhdr">Description</td> + <td width="11%" class="listhdrr">Src. addr</td> + <td width="11%" class="listhdrr">Src. ports</td> + <td width="11%" class="listhdrr">Dest. addr</td> + <td width="11%" class="listhdrr">Dest. ports</td> + <td width="11%" class="listhdrr">NAT IP</td> + <td width="11%" class="listhdrr">NAT Ports</td> + <td width="11%" class="listhdr">Description</td> <td width="5%" class="list"> <table border="0" cellspacing="0" cellpadding="1"> <tr> @@ -273,7 +273,12 @@ echo "<script type=\"text/javascript\" language=\"javascript\" src=\"/javascript <?=$textss;?><?php echo $alias_target_span_begin;?><?php echo htmlspecialchars($natent['target']);?><?php echo $alias_target_span_end;?><?=$textse;?> </td> <td class="listr" onClick="fr_toggle(<?=$nnats;?>)" id="frd<?=$nnats;?>" ondblclick="document.location='firewall_nat_edit.php?id=<?=$nnats;?>';"> - <?=$textss;?><?php echo $alias_local_port_span_begin;?><?php echo htmlspecialchars(pprint_port($natent['local-port']));?><?php echo $alias_local_port_span_end;?><?=$textse;?> + <?php + list($dstbeginport, $dstendport) = split("-", $natent['destination']['port']); + $localendport = $natent['local-port'] + $dstendport - $dstbeginport; + $localport = $natent['local-port'] . '-' . $localendport; + ?> + <?=$textss;?><?php echo $alias_local_port_span_begin;?><?php echo htmlspecialchars(pprint_port($localport));?><?php echo $alias_local_port_span_end;?><?=$textse;?> </td> <td class="listbg" onClick="fr_toggle(<?=$nnats;?>)" ondblclick="document.location='firewall_nat_edit.php?id=<?=$nnats;?>';"> |