diff options
author | Renato Botelho <garga@FreeBSD.org> | 2014-12-11 19:47:05 -0200 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2014-12-11 19:50:00 -0200 |
commit | fcc96054a0935a2eb4aa380ccf0fc8c44987715f (patch) | |
tree | 4e39547cd9d82b6de4116772b1f7d236f250ffa7 /usr/local/www/javascript | |
parent | c03ed2fb58c365e7e98bfc2912e5436896f0b3ce (diff) | |
download | pfsense-fcc96054a0935a2eb4aa380ccf0fc8c44987715f.zip pfsense-fcc96054a0935a2eb4aa380ccf0fc8c44987715f.tar.gz |
Split ICMP and ICMPv6 types on Firewall Rules
- Remove redundant declaration of $icmptypes and move it to a common
place (filter.inc)
- Add missing ICMP types for v4
- Add ICMPv6 types
- Adjust javascripts to show correct options depending of IP Protocol
- Hide ICMP type selection when protocol is IPv4+v6
It fixes #3389
Diffstat (limited to 'usr/local/www/javascript')
-rw-r--r-- | usr/local/www/javascript/firewall_rules_edit/firewall_rules_edit.js | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/usr/local/www/javascript/firewall_rules_edit/firewall_rules_edit.js b/usr/local/www/javascript/firewall_rules_edit/firewall_rules_edit.js index f8d714d..de1ff0c 100644 --- a/usr/local/www/javascript/firewall_rules_edit/firewall_rules_edit.js +++ b/usr/local/www/javascript/firewall_rules_edit/firewall_rules_edit.js @@ -111,16 +111,28 @@ function proto_change() { if (document.iform.proto.selectedIndex == 3) { document.iform.icmptype.disabled = 0; + document.iform.icmp6type.disabled = 0; } else { document.iform.icmptype.disabled = 1; + document.iform.icmp6type.disabled = 1; } ext_change(); if(document.iform.proto.selectedIndex == 3 || document.iform.proto.selectedIndex == 4) { - document.getElementById("icmpbox").style.display = ''; + if(document.iform.ipprotocol.selectedIndex == 0) { // IPv4 + document.getElementById("icmpbox").style.display = ''; + document.getElementById("icmp6box").style.display = 'none'; + } else if(document.iform.ipprotocol.selectedIndex == 1) { // IPv6 + document.getElementById("icmpbox").style.display = 'none'; + document.getElementById("icmp6box").style.display = ''; + } else { // IPv4 + IPv6 + document.getElementById("icmpbox").style.display = 'none'; + document.getElementById("icmp6box").style.display = 'none'; + } } else { document.getElementById("icmpbox").style.display = 'none'; + document.getElementById("icmp6box").style.display = 'none'; } if(document.iform.proto.selectedIndex >= 0 && document.iform.proto.selectedIndex <= 2) { |