luci-app-firewall: fix family display for port forwards
authorJo-Philipp Wich <jo@mein.io>
Thu, 16 Jan 2020 12:54:22 +0000 (13:54 +0100)
committerJo-Philipp Wich <jo@mein.io>
Thu, 16 Jan 2020 12:54:22 +0000 (13:54 +0100)
The underlying fw3 program currently only does IPv4 port forwards while
LuCI incorrectly reports IPv4 + IPv6 for each forward. Adjust the text
accordingly to fix this.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js

index dc2249275e7e3cad735141e6afd6b06999ddf87a..af2f9b76e84fc23c3b80d4b64652801b5314a044 100644 (file)
@@ -43,7 +43,7 @@ function fmt(fmt /*, ...*/) {
 
 function forward_proto_txt(s) {
        return fmt('%s-%s',
-               fwtool.fmt_family(uci.get('firewall', s, 'family')),
+               fwtool.fmt_family('ipv4'),
                fwtool.fmt_proto(uci.get('firewall', s, 'proto'),
                                 uci.get('firewall', s, 'icmp_type')) || 'TCP+UDP');
 }