From fa898ccb4f79726861d5acb7901356d2e570c2a7 Mon Sep 17 00:00:00 2001 From: Tim Wilkinson Date: Fri, 23 Dec 2022 21:01:07 -0800 Subject: [PATCH] Fix tonumber parsing when value is actually an error value (#580) --- files/usr/local/bin/olsrd-config | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/files/usr/local/bin/olsrd-config b/files/usr/local/bin/olsrd-config index 2db71b58..e3c4d4f4 100755 --- a/files/usr/local/bin/olsrd-config +++ b/files/usr/local/bin/olsrd-config @@ -292,7 +292,8 @@ print([[}]]) -- add the ACTIVE tunnel interfaces if #tunnels > 0 then - local tun_weight = tonumber(cursor:get("aredn", "@tunnel[0]", "weight")) + local tun_weight = cursor:get("aredn", "@tunnel[0]", "weight") + tun_weight = tonumber(tun_weight) local tuns = "" for _, tunnel in ipairs(tunnels) do