luci-olsr: Fix Net list netmask parsing
authorVasilis Tsiligiannis <b_tsiligiannis@silverton.gr>
Tue, 2 Jun 2009 21:09:38 +0000 (21:09 +0000)
committerVasilis Tsiligiannis <b_tsiligiannis@silverton.gr>
Tue, 2 Jun 2009 21:09:38 +0000 (21:09 +0000)
applications/luci-olsr/luasrc/model/cbi/olsr/olsrdplugins.lua

index 48dca0aabeb025f34055f3a9b1ab46a00f61291a..03f18a81801d3af9fc53214d31e770d18718f256 100644 (file)
@@ -56,7 +56,7 @@ if arg[1] then
        local function IpMask2Cidr(val)
                if val then
                        for i = 1, #val do
-                               local ip, mask = val[i]:gmatch("([^%s+])%s+([^%s+])")()
+                               local ip, mask = val[i]:gmatch("([^%s]+)%s+([^%s]+)")()
                                local cidr
                                if ip and mask and ip:match(":") then
                                        cidr = luci.ip.IPv6(ip, mask)