From d022c876514107bd345a17a0c01896947a83b45f Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 22 Oct 2024 21:38:38 +0200 Subject: ipv6-update: ignore if address was acquired https://github.com/eworm-de/routeros-scripts/issues/85 --- ipv6-update.rsc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ipv6-update.rsc b/ipv6-update.rsc index 0577bdc..47bf3de 100644 --- a/ipv6-update.rsc +++ b/ipv6-update.rsc @@ -18,12 +18,18 @@ :global ParseKeyValueStore; :global ScriptLock; + :local NaAddress $"na-address"; :local PdPrefix $"pd-prefix"; :if ([ $ScriptLock $ScriptName ] = false) do={ :error false; } + :if ([ :typeof $NaAddress ] = "str") do={ + $LogPrint info $ScriptName ("An address (" . $NaAddress . ") was acquired, not a prefix. Ignoring."); + :error false; + } + :if ([ :typeof $PdPrefix ] = "nothing") do={ $LogPrint error $ScriptName ("This script is supposed to run from ipv6 dhcp-client."); :error false; -- cgit v1.2.3-70-g09d2