applications/olsr: Make sure ipv6 addresses from are in the same format when we compa...
authorManuel Munz <freifunk@somakoma.de>
Mon, 21 Jan 2013 14:14:34 +0000 (14:14 +0000)
committerManuel Munz <freifunk@somakoma.de>
Mon, 21 Jan 2013 14:14:34 +0000 (14:14 +0000)
applications/luci-olsr/luasrc/controller/olsr.lua

index 0342bde49b0479a2aaf9c82227cf8374293a2b5e..fc44820dc9df19d564940c33f46b1ddf9582881c 100644 (file)
@@ -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