applications/luci-olsr: make olsrd status pages ipv6 capable
authorJo-Philipp Wich <jow@openwrt.org>
Mon, 22 Dec 2008 02:59:05 +0000 (02:59 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Mon, 22 Dec 2008 02:59:05 +0000 (02:59 +0000)
applications/luci-olsr/luasrc/controller/olsr.lua

index 97e5061..766107e 100644 (file)
@@ -182,7 +182,14 @@ function fetch_txtinfo(otable)
        local rawdata = luci.sys.httpget("http://127.0.0.1:2006/"..otable)
 
        if #rawdata == 0 then
        local rawdata = luci.sys.httpget("http://127.0.0.1:2006/"..otable)
 
        if #rawdata == 0 then
-               return nil
+               if luci.fs.access("/proc/net/ipv6_route", "r") then
+                       rawdata = luci.sys.httpget("http://[::1]:2006/"..otable)
+                       if #rawdata == 0 then
+                               return nil
+                       end
+               else
+                       return nil
+               end
        end
 
        local data = {}
        end
 
        local data = {}