summaryrefslogtreecommitdiffstats
path: root/usr/local/www/firewall_nat.php
diff options
context:
space:
mode:
authorRenato Botelho <renato.botelho@bluepex.com>2010-04-08 16:46:14 -0300
committerRenato Botelho <renato.botelho@bluepex.com>2010-04-08 16:46:14 -0300
commit47c5a08f7614c796dad0e97c302a5f2d8640c758 (patch)
tree7341e3010a6598f836f06376ea9df64877ceef23 /usr/local/www/firewall_nat.php
parentd479c2931be0308e3e3a55e2ac767cd774724509 (diff)
downloadpfsense-47c5a08f7614c796dad0e97c302a5f2d8640c758.zip
pfsense-47c5a08f7614c796dad0e97c302a5f2d8640c758.tar.gz
Fix table sizes and calculate local port range
Diffstat (limited to 'usr/local/www/firewall_nat.php')
-rwxr-xr-xusr/local/www/firewall_nat.php21
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">&nbsp;</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;?>';">
OpenPOWER on IntegriCloud