Revision a3e7bd0b
Added by Renato Botelho about 15 years ago
usr/local/www/firewall_nat_edit.php | ||
---|---|---|
164 | 164 |
if (is_specialnet($_POST['dsttype'])) { |
165 | 165 |
$_POST['dst'] = $_POST['dsttype']; |
166 | 166 |
$_POST['dstmask'] = 0; |
167 |
} else if ($_POST['dsttype'] == "single") {
|
|
167 |
} else if ($_POST['dsttype'] == "single") { |
|
168 | 168 |
$_POST['dstmask'] = 32; |
169 |
} else if (is_ipaddr($_POST['dsttype'])) { |
|
170 |
$_POST['dst'] = $_POST['dsttype']; |
|
171 |
$_POST['dstmask'] = 32; |
|
172 |
$_POST['dsttype'] = "single"; |
|
169 | 173 |
} |
170 | 174 |
|
171 | 175 |
unset($input_errors); |
... | ... | |
444 | 448 |
<tr> |
445 | 449 |
<td width="22%" valign="top" class="vncellreq">Interface</td> |
446 | 450 |
<td width="78%" class="vtable"> |
447 |
<select name="interface" class="formselect" onChange="change_dst(this.value);typesel_change();">
|
|
451 |
<select name="interface" class="formselect" onChange="dst_change(this.value);typesel_change();">
|
|
448 | 452 |
<?php |
449 | 453 |
|
450 | 454 |
$iflist = get_configured_interface_with_descr(false, true); |
... | ... | |
617 | 621 |
</option> |
618 | 622 |
<?php endif; ?> |
619 | 623 |
<?php endforeach; ?> |
624 |
|
|
625 |
<?php if (is_array($config['virtualip']['vip'])): |
|
626 |
foreach ($config['virtualip']['vip'] as $sn): |
|
627 |
if ($sn['mode'] == "proxyarp" && $sn['type'] == "network"): |
|
628 |
$baseip = ip2long($sn['subnet']) & ip2long(gen_subnet_mask($sn['subnet_bits'])); |
|
629 |
|
|
630 |
for ($i = $sn['subnet_bits']; $i <= 32; $i++): |
|
631 |
$baseip = $baseip + 1; |
|
632 |
$snip = long2ip($baseip); |
|
633 |
?> |
|
634 |
<option value="<?=$snip;?>" <?php if ($snip == $pconfig['dst']) echo "selected"; ?>><?=htmlspecialchars("{$snip} ({$sn['descr']})");?></option> |
|
635 |
<?php endfor; |
|
636 |
else: |
|
637 |
?> |
|
638 |
<option value="<?=$sn['subnet'];?>" <?php if ($sn['subnet'] == $pconfig['dst']) echo "selected"; ?>><?=htmlspecialchars("{$sn['subnet']} ({$sn['descr']})");?></option> |
|
639 |
<?php endif; |
|
640 |
endforeach; |
|
641 |
endif; |
|
642 |
?> |
|
620 | 643 |
</select> |
621 | 644 |
</td> |
622 | 645 |
</tr> |
... | ... | |
783 | 806 |
ext_change(); |
784 | 807 |
typesel_change(); |
785 | 808 |
proto_change(); |
809 |
dst_change(); |
|
786 | 810 |
//--> |
787 | 811 |
</script> |
788 | 812 |
<?php |
... | ... | |
815 | 839 |
var addressarray=new Array(<?php echo $aliasesaddr; ?>); |
816 | 840 |
var customarray=new Array(<?php echo $portaliases; ?>); |
817 | 841 |
|
818 |
var oTextbox1 = new AutoSuggestControl(document.getElementById("localip"), new StateSuggestions(addressarray));
|
|
819 |
var oTextbox2 = new AutoSuggestControl(document.getElementById("src"), new StateSuggestions(addressarray));
|
|
820 |
var oTextbox3 = new AutoSuggestControl(document.getElementById("dst"), new StateSuggestions(addressarray));
|
|
821 |
var oTextbox4 = new AutoSuggestControl(document.getElementById("dstbeginport_cust"), new StateSuggestions(customarray));
|
|
822 |
var oTextbox5 = new AutoSuggestControl(document.getElementById("dstendport_cust"), new StateSuggestions(customarray));
|
|
823 |
var oTextbox6 = new AutoSuggestControl(document.getElementById("srcbeginport_cust"), new StateSuggestions(customarray));
|
|
824 |
var oTextbox7 = new AutoSuggestControl(document.getElementById("srcendport_cust"), new StateSuggestions(customarray));
|
|
825 |
var oTextbox8 = new AutoSuggestControl(document.getElementById("localbeginport_cust"), new StateSuggestions(customarray));
|
|
842 |
var oTextbox1 = new AutoSuggestControl(document.getElementById("localip"), new StateSuggestions(addressarray));
|
|
843 |
var oTextbox2 = new AutoSuggestControl(document.getElementById("src"), new StateSuggestions(addressarray));
|
|
844 |
var oTextbox3 = new AutoSuggestControl(document.getElementById("dst"), new StateSuggestions(addressarray));
|
|
845 |
var oTextbox4 = new AutoSuggestControl(document.getElementById("dstbeginport_cust"), new StateSuggestions(customarray));
|
|
846 |
var oTextbox5 = new AutoSuggestControl(document.getElementById("dstendport_cust"), new StateSuggestions(customarray));
|
|
847 |
var oTextbox6 = new AutoSuggestControl(document.getElementById("srcbeginport_cust"), new StateSuggestions(customarray));
|
|
848 |
var oTextbox7 = new AutoSuggestControl(document.getElementById("srcendport_cust"), new StateSuggestions(customarray));
|
|
849 |
var oTextbox8 = new AutoSuggestControl(document.getElementById("localbeginport_cust"), new StateSuggestions(customarray));
|
|
826 | 850 |
//--> |
827 | 851 |
</script> |
828 | 852 |
<?php include("fend.inc"); ?> |
Also available in: Unified diff
Consider VIPs on Destination Address and below few fixes
- Rename change_dst to dst_change to follow standards
- Fix indent