summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-firewall
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2012-01-01 15:31:25 +0000
committerJo-Philipp Wich <jow@openwrt.org>2012-01-01 15:31:25 +0000
commit0ce6a286f78108ed1b5ce52c8217f1494ceca257 (patch)
tree741910cb3f6450503a62a1ebd2cf7b16ce50aee2 /applications/luci-firewall
parent706eb828ad51f862e7582c5fe5355e1c73475de1 (diff)
applications/luci-firewall: fix crash in rule formatting helper when a rule with an /128 ipv6 prefix is encountered
Diffstat (limited to 'applications/luci-firewall')
-rw-r--r--applications/luci-firewall/luasrc/tools/firewall.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/applications/luci-firewall/luasrc/tools/firewall.lua b/applications/luci-firewall/luasrc/tools/firewall.lua
index 52bce6321..a2dcbea8d 100644
--- a/applications/luci-firewall/luasrc/tools/firewall.lua
+++ b/applications/luci-firewall/luasrc/tools/firewall.lua
@@ -86,7 +86,7 @@ function fmt_ip(x, d)
a, m = v:match("(%S+)/(%d+%.%S+)")
a = a or v
a = a:match(":") and ip.IPv6(a, m) or ip.IPv4(a, m)
- if a and (a:is6() or a:prefix() < 32) then
+ if a and (a:is6() and a:prefix() < 128 or a:prefix() < 32) then
l[1] = translate("IP range")
l[#l+1] = "<var title='%s - %s'>%s%s</var>" %{
a:minhost():string(),