summaryrefslogtreecommitdiffhomepage
path: root/libs/core
diff options
context:
space:
mode:
Diffstat (limited to 'libs/core')
-rw-r--r--libs/core/luasrc/ip.lua2
1 files changed, 2 insertions, 0 deletions
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)