diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2006-09-04 22:03:35 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2006-09-04 22:03:35 +0000 |
commit | e2705d6797e310a892c59e7ec7d6acc0ee6f2d22 (patch) | |
tree | 50829043f39562877b706c39929164a41c2b9673 /usr/local/www/javascript/firewall_nat_edit | |
parent | cedeafc0152438bab0d25efb45be9c77a35e1c95 (diff) | |
download | pfsense-e2705d6797e310a892c59e7ec7d6acc0ee6f2d22.zip pfsense-e2705d6797e310a892c59e7ec7d6acc0ee6f2d22.tar.gz |
When a External port range item is an alias, disallow the entry of Local port.
In-discussion-with: BillM
Bug-reported-by: ChrisB
Diffstat (limited to 'usr/local/www/javascript/firewall_nat_edit')
-rw-r--r-- | usr/local/www/javascript/firewall_nat_edit/firewall_nat_edit.js | 43 |
1 files changed, 40 insertions, 3 deletions
diff --git a/usr/local/www/javascript/firewall_nat_edit/firewall_nat_edit.js b/usr/local/www/javascript/firewall_nat_edit/firewall_nat_edit.js index 91e131d..435071b 100644 --- a/usr/local/www/javascript/firewall_nat_edit/firewall_nat_edit.js +++ b/usr/local/www/javascript/firewall_nat_edit/firewall_nat_edit.js @@ -25,6 +25,44 @@ function ext_rep_change() { document.iform.localbeginport.selectedIndex = document.iform.beginport.selectedIndex; } +function check_for_aliases() { + /* if External port range is an alias, then disallow + * entry of Local port + */ + document.iform.endport_cust.disabled = 0; + document.iform.localbeginport.disabled = 0; + for(i=0; i<customarray.length; i++) { + if(document.iform.beginport_cust.value == customarray[i]) { + alert(customarray[i]); + document.iform.endport_cust.value = ""; + document.iform.endport_cust.disabled = 1; + document.iform.localbeginport_cust.value = ""; + document.iform.localbeginport.disabled = 1; + document.iform.localbeginport_cust.disabled = 1; + } + if(document.iform.beginport.value == customarray[i]) { + document.iform.endport_cust.value = ""; + document.iform.endport_cust.disabled = 1; + document.iform.localbeginport_cust.value = ""; + document.iform.localbeginport.disabled = 1; + document.iform.localbeginport_cust.disabled = 1; + } + if(document.iform.endport_cust.value == customarray[i]) { + document.iform.endport_cust.value = ""; + document.iform.endport_cust.disabled = 1; + document.iform.localbeginport_cust.value = ""; + document.iform.localbeginport.disabled = 1; + document.iform.localbeginport_cust.disabled = 1; + } + if(document.iform.endport.value == customarray[i]) { + document.iform.endport_cust.value = ""; + document.iform.endport_cust.disabled = 1; + document.iform.localbeginport_cust.value = ""; + document.iform.localbeginport.disabled = 1; + document.iform.localbeginport_cust.disabled = 1; + } + } +} function proto_change() { if(document.iform.proto.selectedIndex > 2) { @@ -33,16 +71,15 @@ function proto_change() { document.iform.beginport.disabled = 1; document.iform.endport.disabled = 1; document.iform.localbeginport_cust.disabled = 1; - document.iform.localbeginport.disabled = 1; + document.iform.localbeginport.disabled = 1; } else { document.iform.beginport_cust.disabled = 0; document.iform.endport_cust.disabled = 0; document.iform.beginport.disabled = 0; document.iform.endport.disabled = 0; document.iform.localbeginport_cust.disabled = 0; - document.iform.localbeginport.disabled = 0; + document.iform.localbeginport.disabled = 0; } - } window.onload = function () { |