summaryrefslogtreecommitdiffhomepage
path: root/applications
diff options
context:
space:
mode:
authorManuel Munz <freifunk@somakoma.de>2013-01-21 14:14:34 +0000
committerManuel Munz <freifunk@somakoma.de>2013-01-21 14:14:34 +0000
commit07c2268d72daae5b7160d3f0ecc1eeeafc86601e (patch)
treea18140ac1b80fcc3eee81310a0245b026af681a8 /applications
parentcb178921dad84ef91f17f25f68f73ce2fb95e055 (diff)
applications/olsr: Make sure ipv6 addresses from are in the same format when we compare them
Diffstat (limited to 'applications')
-rw-r--r--applications/luci-olsr/luasrc/controller/olsr.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/applications/luci-olsr/luasrc/controller/olsr.lua b/applications/luci-olsr/luasrc/controller/olsr.lua
index 0342bde49..fc44820dc 100644
--- a/applications/luci-olsr/luasrc/controller/olsr.lua
+++ b/applications/luci-olsr/luasrc/controller/olsr.lua
@@ -334,9 +334,10 @@ function fetch_txtinfo(otable)
uci:foreach("network", "interface",
function(s)
local localip = string.gsub(fields[k], ' ', ''):upper()
+ localip = luci.ip.IPv6(localip):string()
if s.ip6addr then
s.ip6addr = luci.ip.IPv6(s.ip6addr):string()
- local ip6addr = string.gsub(s.ip6addr, '\/.*', '')
+ local ip6addr = string.gsub(s.ip6addr, '\/.*', ''):upper()
if ip6addr == localip then
data[name][di]['Local Device'] = s['.name'] or s.interface
end