luci-app-bmx6: Initialize tun6in6 variable and add further checks
authorPau Escrich <p4u@dabax.net>
Fri, 10 Jan 2014 16:37:57 +0000 (17:37 +0100)
committerPau Escrich <p4u@dabax.net>
Fri, 10 Jan 2014 16:37:57 +0000 (17:37 +0100)
Signed-off-by: Pau Escrich <p4u@dabax.net>
luci-app-bmx6/files/usr/lib/lua/luci/view/bmx6/nodes_j.htm

index 730fd29bf9309f98c2c916182a35b9c989bcebe9..c9e3c9c7a57329a1b708a9209540141a5d63b3df 100644 (file)
                        // Looking for the extensions
                        var hna6 = [];
                        var tun4in6 = [];
-                       var tun6 = [];
+                       var tun6in6 = [];
+
                        for( var e = 0; e < extensions.length; e++)
                                {
                                if( extensions[e].HNA6_EXTENSION )
 
                        // Gateways
                        var gateways = '<ul>';
+                       if ( typeof(tun4in6) !== "undefined" && tun4in6 !== null )
                        for ( var t = 0; t < tun4in6.length; t++)
                                {
                                if ( tun4in6[t].networklen == "32" )
                                        gateways += "<li>"+tun4in6[t].network+'/'+tun4in6[t].networklen + ' | ' + tun4in6[t].bandwidth+'</li>';
                                }
 
+                       if ( typeof(tun6in6) !== "undefined" && tun6in6 !== null )
                        for ( var t = 0; t < tun6in6.length; t++)
                                {
                                if ( tun6in6[t].networklen == "128" )