From 66e92f5fc057ef7081f23b29a72e4ad68f82fbde Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Sat, 1 Aug 2009 20:41:52 +0000 Subject: [PATCH] luci-0.9: merge r5191 --- libs/core/luasrc/ip.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libs/core/luasrc/ip.lua b/libs/core/luasrc/ip.lua index 8ac017e02..0a66804e8 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) -- 2.25.1