From: Jo-Philipp Wich Date: Sat, 1 Aug 2009 20:41:52 +0000 (+0000) Subject: luci-0.9: merge r5191 X-Git-Tag: 0.9.0~139 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=66e92f5fc057ef7081f23b29a72e4ad68f82fbde;p=project%2Fluci.git luci-0.9: merge r5191 --- diff --git a/libs/core/luasrc/ip.lua b/libs/core/luasrc/ip.lua index 8ac017e022..0a66804e8e 100644 --- a/libs/core/luasrc/ip.lua +++ b/libs/core/luasrc/ip.lua @@ -159,6 +159,7 @@ function IPv4(address, netmask) local data = {} local prefix = address:match("/(.+)") address = address:gsub("/.+","") + address = address:gsub("^%[(.*)%]$", "%1"):upper():gsub("^::FFFF:", "") if netmask then prefix = obj:prefix(netmask) @@ -206,6 +207,7 @@ function IPv6(address, netmask) local data = {} local prefix = address:match("/(.+)") address = address:gsub("/.+","") + address = address:gsub("^%[(.*)%]$", "%1") if netmask then prefix = obj:prefix(netmask)