summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-firewall
diff options
context:
space:
mode:
Diffstat (limited to 'applications/luci-app-firewall')
-rw-r--r--applications/luci-app-firewall/htdocs/luci-static/resources/tools/firewall.js9
-rw-r--r--applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js3
-rw-r--r--applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js3
3 files changed, 13 insertions, 2 deletions
diff --git a/applications/luci-app-firewall/htdocs/luci-static/resources/tools/firewall.js b/applications/luci-app-firewall/htdocs/luci-static/resources/tools/firewall.js
index 6785d1ca6..198528aaa 100644
--- a/applications/luci-app-firewall/htdocs/luci-static/resources/tools/firewall.js
+++ b/applications/luci-app-firewall/htdocs/luci-static/resources/tools/firewall.js
@@ -211,6 +211,15 @@ return L.Class.extend({
return rv;
},
+ fmt_family: function(family) {
+ if (family == 'ipv4')
+ return _('IPv4');
+ else if (family == 'ipv6')
+ return _('IPv6');
+ else
+ return _('IPv4 and IPv6');
+ },
+
fmt_proto: function(x, icmp_types) {
var rv = E([]), l = L.toArray(x);
diff --git a/applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js b/applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js
index 93bfc2918..ffbfe3ccd 100644
--- a/applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js
+++ b/applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js
@@ -42,7 +42,8 @@ function fmt(fmt /*, ...*/) {
}
function forward_proto_txt(s) {
- return fmt('%s-%s', _('IPv4'),
+ return fmt('%s-%s',
+ fwtool.fmt_family(uci.get('firewall', s, 'family')),
fwtool.fmt_proto(uci.get('firewall', s, 'proto'),
uci.get('firewall', s, 'icmp_type')) || 'TCP+UDP');
}
diff --git a/applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js b/applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js
index d2d191632..e67397268 100644
--- a/applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js
+++ b/applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js
@@ -42,7 +42,8 @@ function fmt(fmt /*, ...*/) {
}
function forward_proto_txt(s) {
- return fmt('%s-%s', _('IPv4'),
+ return fmt('%s-%s',
+ fwtool.fmt_family(uci.get('firewall', s, 'family')),
fwtool.fmt_proto(uci.get('firewall', s, 'proto'),
uci.get('firewall', s, 'icmp_type')) || 'TCP+UDP');
}