projects
/
project
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e180231
)
luci-0.9: merge r5191
author
Jo-Philipp Wich
<jow@openwrt.org>
Sat, 1 Aug 2009 20:41:52 +0000
(20:41 +0000)
committer
Jo-Philipp Wich
<jow@openwrt.org>
Sat, 1 Aug 2009 20:41:52 +0000
(20:41 +0000)
libs/core/luasrc/ip.lua
patch
|
blob
|
history
diff --git
a/libs/core/luasrc/ip.lua
b/libs/core/luasrc/ip.lua
index 8ac017e0228098ee1ce53fc6668697af9cf8fdd0..0a66804e8e2eb1a249e85e042f86dbbe8b7190f5 100644
(file)
--- 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)