aboutsummaryrefslogtreecommitdiffstats
path: root/ipv6-update
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2021-01-03 20:22:56 +0100
committerGravatar Christian Hesse <mail@eworm.de>2021-01-03 20:27:24 +0100
commit241d5fd2d7a3f5d7d79ef81ac5e1d736689ccdef (patch)
treeccb129f7026fce87993744b25ca56e8db3182f27 /ipv6-update
parent4368f500c3e5438bf6ccba2433def3b93670a765 (diff)
ipv6-update: simplify the code...
... and make it match the code used in other scripts.
Diffstat (limited to 'ipv6-update')
-rw-r--r--ipv6-update7
1 files changed, 3 insertions, 4 deletions
diff --git a/ipv6-update b/ipv6-update
index 34ed88c..d5b15c4 100644
--- a/ipv6-update
+++ b/ipv6-update
@@ -16,12 +16,11 @@
}
:local Pool [ / ipv6 pool get [ find where prefix=$PdPrefix ] name ];
-:local AddrList [ / ipv6 firewall address-list find where comment=("ipv6-pool-" . $Pool) ];
-:if ([ :len $AddrList ] = 0) do={
- :log info ("Missing ipv6 address list entry for ipv6-pool-" . $Pool . ", adding.");
+:if ([ :len [ / ipv6 firewall address-list find where comment=("ipv6-pool-" . $Pool) ] ] = 0) do={
/ ipv6 firewall address-list add list=("ipv6-pool-" . $Pool) address=:: comment=("ipv6-pool-" . $Pool);
- :set AddrList [ / ipv6 firewall address-list find where comment=("ipv6-pool-" . $Pool) ];
+ :log warning ("Added ipv6 address list entry for ipv6-pool-" . $Pool . ".");
}
+:local AddrList [ / ipv6 firewall address-list find where comment=("ipv6-pool-" . $Pool) ];
:local OldPrefix [ / ipv6 firewall address-list get ($AddrList->0) address ];
:if ($OldPrefix != $PdPrefix) do={