luci-app-mwan3: fix stack trace if no tacking_ip is set on interface add
authorFlorian Eckert <fe@dev.tdt.de>
Tue, 27 Feb 2018 14:00:50 +0000 (15:00 +0100)
committerFlorian Eckert <fe@dev.tdt.de>
Thu, 1 Mar 2018 09:47:38 +0000 (10:47 +0100)
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
applications/luci-app-mwan3/luasrc/model/cbi/mwan/interface.lua

index 920dc6afb18937aed7c1d6c8d0eeaaf0aa06895a..4b1a070d1bffdb981bff86fb5aabe01630cbab85 100644 (file)
@@ -93,7 +93,7 @@ function configCheck()
 
                        local trackingNumber = uci:get("mwan3", iface, "track_ip")
                        overview[iface]["tracking"] = 0
-                       if #trackingNumber > 0 then
+                       if trackingNumber and #trackingNumber > 0 then
                                overview[iface]["tracking"] = #trackingNumber
                                overview[iface]["reliability"] = false
                                local reliabilityNumber = tonumber(uci:get("mwan3", iface, "reliability"))